mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-11-19 03:52:21 +05:30
Make it possible to override nginx listen port in container
This commit is contained in:
parent
0de73e8971
commit
57935ae0df
2 changed files with 6 additions and 3 deletions
|
|
@ -12,6 +12,9 @@ RUN pnpm build
|
||||||
# production stage
|
# production stage
|
||||||
FROM nginx:stable-alpine AS production-stage
|
FROM nginx:stable-alpine AS production-stage
|
||||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/templates/default.conf.template
|
||||||
EXPOSE 80
|
|
||||||
|
ENV PORT=80
|
||||||
|
EXPOSE $PORT
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen ${PORT};
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue