Update Dockerfile
Browse files- Dockerfile +10 -24
Dockerfile
CHANGED
@@ -5,34 +5,20 @@ WORKDIR /code
|
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
-
ENV AWS_ACCESS_KEY_ID=AKIAZXQAW4VHDHDC5TBA
|
9 |
-
ENV AWS_SECRET_ACCESS_KEY=zhmgQHHAlhowQJRieaUT6zU3lu6pVIKhuv4ZtxPD
|
10 |
-
ENV AWS_DEFAULT_REGION=ap-northeast-2
|
11 |
|
12 |
-
#
|
13 |
-
RUN
|
14 |
-
mkdir -p /app/secrets && \
|
15 |
-
cat /run/secrets/DEZGO_API_KEY > /app/secrets/dezgo_api_key.txt
|
16 |
-
|
17 |
-
RUN --mount=type=secret,id=APPSSCRIPT_URL,mode=0444,required=true \
|
18 |
-
cat /run/secrets/APPSSCRIPT_URL > /app/secrets/appsscript_url.txt
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
RUN --mount=type=secret,id=FB_PRIV_KEY,mode=0444,required=true \
|
24 |
-
cat /run/secrets/FB_PRIV_KEY > /app/secrets/fb_priv_key.txt
|
25 |
-
|
26 |
-
RUN --mount=type=secret,id=CLIENT_EMAIL,mode=0444,required=true \
|
27 |
-
cat /run/secrets/CLIENT_EMAIL > /app/secrets/client_email.txt
|
28 |
-
|
29 |
-
RUN --mount=type=secret,id=CLIENT_ID,mode=0444,required=true \
|
30 |
-
cat /run/secrets/CLIENT_ID > /app/secrets/client_id.txt
|
31 |
-
|
32 |
-
RUN --mount=type=secret,id=CLIENT_X509_CERT_URL,mode=0444,required=true \
|
33 |
-
cat /run/secrets/CLIENT_X509_CERT_URL > /app/secrets/client_x509_cert_url.txt
|
34 |
|
|
|
|
|
35 |
|
|
|
|
|
|
|
36 |
COPY . .
|
37 |
|
38 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
|
|
|
|
|
8 |
|
9 |
+
# Create Docker secret
|
10 |
+
RUN mkdir -p /app/secrets
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
# Use the Docker secret at build time to write it to a file
|
13 |
+
RUN --mount=type=secret,id=GOOGLEAPI_SECRET,mode=0444,required=true \
|
14 |
+
cat /run/secrets/GOOGLEAPI_SECRET > /app/secrets/googleapi_secret.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
+
RUN --mount=type=secret,id=FB_SECRET,mode=0444,required=true \
|
17 |
+
cat /run/secrets/FB_SECRET > /app/secrets/fb_secret.json
|
18 |
|
19 |
+
RUN --mount=type=secret,id=OPENAI_KEY,mode=0444,required=true \
|
20 |
+
cat /run/secrets/OPENAI_KEY > /app/secrets/openai_key.txt
|
21 |
+
|
22 |
COPY . .
|
23 |
|
24 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|