Update Dockerfile
Browse files- Dockerfile +3 -2
Dockerfile
CHANGED
@@ -7,10 +7,11 @@ COPY w_env.ts /app/server/env.ts
|
|
7 |
# 将当前目录下的所有文件复制到工作目录
|
8 |
#ENV NODE_ENV=production
|
9 |
RUN npm install
|
10 |
-
RUN
|
|
|
11 |
RUN cat /app/config/.env
|
12 |
#RUN npm run build
|
13 |
# Start the server by default, this can be overwritten at runtime
|
14 |
EXPOSE 3000
|
15 |
-
ENV GOOGLE_API_KEY=$(cat /run/secrets/API_KEY)
|
16 |
CMD ["npm", "run", "dev"]
|
|
|
7 |
# 将当前目录下的所有文件复制到工作目录
|
8 |
#ENV NODE_ENV=production
|
9 |
RUN npm install
|
10 |
+
RUN --mount=type=secret,id=API_KEY,mode=0444,required=true \
|
11 |
+
echo "GOOGLE_API_KEY=$(cat /run/secrets/API_KEY)" > /app/config/.env
|
12 |
RUN cat /app/config/.env
|
13 |
#RUN npm run build
|
14 |
# Start the server by default, this can be overwritten at runtime
|
15 |
EXPOSE 3000
|
16 |
+
#ENV GOOGLE_API_KEY=$(cat /run/secrets/API_KEY)
|
17 |
CMD ["npm", "run", "dev"]
|