Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…orage-handler into consts
  • Loading branch information
psankhe28 committed Aug 31, 2024
2 parents 024710a + 4132bfd commit 24671ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ make u
| **Environment Variable** | **Description** | **Usage** | **Error Handling** |
|--|--|--|--|
| `MINIO_HOSTNAME` | The hostname for the MinIO server. | Used to specify the MinIO server's hostname in the application. | If not set, the application might fail to connect to the MinIO server, leading to a connection error. |
| `MINIO_PORT` | The port for the MinIO server. | Specifies the port on which the MinIO server is running. | If not set, the application may default to an incorrect port, causing connection failures. |
| `MINIO_PORT` | The port for the MinIO server. Default is 9000. | Specifies the port on which the MinIO server is running. | If not set, the application will use the default port 9000. |
| `MINIO_ACCESS_KEY` | The access key for MinIO. | Used for authenticating with the MinIO server. | If not set, authentication will fail, preventing access to the MinIO server. |
| `MINIO_SECRET_KEY` | The secret key for MinIO. | Used along with the access key for authenticating with the MinIO server. | If not set, authentication will fail, preventing access to the MinIO server. |
| `MINIO_IS_SECURE` | Boolean to determine if the connection is secure. | Determines if the connection to the MinIO server should use HTTPS. | If not set correctly, the application could fail to connect based on the conditions required of the application |
| `MINIO_IS_SECURE` | Boolean to determine if the connection is secure. | Determines if the connection to the MinIO server should use HTTPS. | If set to `false` when the server requires HTTPS, or `true` when the server doesn't support HTTPS, the application will fail to connect. Ensure this matches your MinIO server's configuration. |
| `MINIO_BUCKET` | The name of the bucket in MinIO. | Specifies the bucket name in MinIO where data will be stored or retrieved. | If not set, the application may fail to find the correct bucket, leading to data access errors. |
| `CSH_FOCA_CONFIG_PATH` | Specifies the path to the configuration file for the FOCA app. | The FOCA app uses this environment variable to locate the configuration file. If not set, it defaults to `dev`. | If the configuration file is not found at the specified or default path, a `FileNotFoundError` will be raised. |

Expand Down
2 changes: 2 additions & 0 deletions tus_storagehandler/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import os

MINIO_HOSTNAME = os.getenv("MINIO_HOSTNAME")
if MINIO_HOSTNAME is None:
raise ValueError("MINIO_HOSTNAME environment variable is not set")
MINIO_PORT = os.getenv("MINIO_PORT")
MINIO_ENDPOINT = f"{MINIO_HOSTNAME}:{MINIO_PORT}"
MINIO_ACCESS_KEY = os.getenv("MINIO_ACCESS_KEY")
Expand Down

0 comments on commit 24671ab

Please sign in to comment.