Skip to content

Commit 11fce9e

Browse files
committed
Merge PR CorentinTh#1670: Make it possible to override nginx listen port
2 parents 5da6300 + 57935ae commit 11fce9e

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ RUN pnpm build
1212
# production stage
1313
FROM nginx:stable-alpine AS production-stage
1414
COPY --from=build-stage /app/dist /usr/share/nginx/html
15-
COPY nginx.conf /etc/nginx/conf.d/default.conf
16-
EXPOSE 80
15+
COPY nginx.conf /etc/nginx/templates/default.conf.template
16+
17+
ENV PORT=80
18+
EXPOSE $PORT
19+
1720
CMD ["nginx", "-g", "daemon off;"]

nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
listen 80;
2+
listen ${PORT};
33
server_name localhost;
44
root /usr/share/nginx/html;
55
index index.html;

0 commit comments

Comments
 (0)