mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-22 14:01:42 +03:00
fix(Docker): allow PORT environment variable
Taken from #1670 Fix #1450 and #224
This commit is contained in:
1 parent
aebb3f2052
commit
be14d3a62b
2 files changed
+7
-4
No files matched your search
+5
-2
@@ -22,6 +22,9 @@ ENV VITE_VERCEL_ENV production
|
|||||||
ARG BASE_URL
|
ARG BASE_URL
|
||||||
ENV BASE_URL=${BASE_URL}
|
ENV BASE_URL=${BASE_URL}
|
||||||
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
|
|
||||||
EXPOSE 8080
|
COPY nginx.conf /etc/nginx/templates/default.conf.template
|
||||||
|
ENV PORT=8080
|
||||||
|
EXPOSE $PORT
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
server {
|
server {
|
||||||
listen 8080;
|
listen ${PORT};
|
||||||
listen [::]:8080;
|
listen [::]:${PORT};
|
||||||
server_name _;
|
server_name _;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|||||||
Reference in new issue
Block a user