File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,8 @@ RUN npm run build
9
9
# Stage 2: Serve the application with Nginx
10
10
FROM nginx:1.27 as production-stage
11
11
COPY --from=build-stage /app/dist /usr/share/nginx/html
12
+ COPY --from=build-stage /app/dist/assets/app-config.js /usr/share/nginx/html-template/app-config.template.js
13
+ COPY ./docker-entrypoint.d/*.sh /docker-entrypoint.d/
14
+ RUN chmod +x /docker-entrypoint.d/*.sh
12
15
EXPOSE 80
13
16
CMD ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ docker build -t copilot-metrics-viewer .
138
138
139
139
### Docker run
140
140
```
141
- docker run -p 8080:80 copilot-metrics-viewer
141
+ docker run -p 8080:80 --env-file ./.env copilot-metrics-viewer
142
142
```
143
143
The application will be accessible at http://localhost:8080
144
144
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ configTemplateFile=/usr/share/nginx/html-template/app-config.template.js
4
+ configTargetFile=/usr/share/nginx/html/assets/app-config.js
5
+
6
+ envsubst < " $configTemplateFile " > " $configTargetFile "
You can’t perform that action at this time.
0 commit comments