Update Dockerfile
Browse files- Dockerfile +25 -6
Dockerfile
CHANGED
|
@@ -1,12 +1,31 @@
|
|
| 1 |
FROM stephengpope/no-code-architects-toolkit:latest
|
| 2 |
|
| 3 |
-
# Set
|
| 4 |
-
ENV
|
| 5 |
-
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
EXPOSE 8080
|
| 12 |
|
|
|
|
| 1 |
FROM stephengpope/no-code-architects-toolkit:latest
|
| 2 |
|
| 3 |
+
# Set non-sensitive environment variables
|
| 4 |
+
ENV MAX_QUEUE_LENGTH=10 \
|
| 5 |
+
GUNICORN_WORKERS=4 \
|
| 6 |
+
GUNICORN_TIMEOUT=300
|
| 7 |
|
| 8 |
+
# Load secrets from Hugging Face Secrets using Docker mounts
|
| 9 |
+
RUN --mount=type=secret,id=API_KEY,required=true \
|
| 10 |
+
export API_KEY=$(cat /run/secrets/API_KEY)
|
| 11 |
+
RUN --mount=type=secret,id=S3_ENDPOINT_URL,required=true \
|
| 12 |
+
export S3_ENDPOINT_URL=$(cat /run/secrets/S3_ENDPOINT_URL)
|
| 13 |
+
RUN --mount=type=secret,id=S3_ACCESS_KEY,required=true \
|
| 14 |
+
export S3_ACCESS_KEY=$(cat /run/secrets/S3_ACCESS_KEY)
|
| 15 |
+
RUN --mount=type=secret,id=S3_SECRET_KEY,required=true \
|
| 16 |
+
export S3_SECRET_KEY=$(cat /run/secrets/S3_SECRET_KEY)
|
| 17 |
+
RUN --mount=type=secret,id=S3_BUCKET_NAME,required=true \
|
| 18 |
+
export S3_BUCKET_NAME=$(cat /run/secrets/S3_BUCKET_NAME)
|
| 19 |
+
RUN --mount=type=secret,id=S3_REGION,required=true \
|
| 20 |
+
export S3_REGION=$(cat /run/secrets/S3_REGION)
|
| 21 |
+
|
| 22 |
+
# Re-export as ENV so the Python app can access them
|
| 23 |
+
ENV API_KEY=$API_KEY \
|
| 24 |
+
S3_ENDPOINT_URL=$S3_ENDPOINT_URL \
|
| 25 |
+
S3_ACCESS_KEY=$S3_ACCESS_KEY \
|
| 26 |
+
S3_SECRET_KEY=$S3_SECRET_KEY \
|
| 27 |
+
S3_BUCKET_NAME=$S3_BUCKET_NAME \
|
| 28 |
+
S3_REGION=$S3_REGION
|
| 29 |
|
| 30 |
EXPOSE 8080
|
| 31 |
|