docker: support changin httpd port with env var

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2024-03-19 15:02:31 +01:00 committed by Jinho Jang
parent 9e44db01f9
commit 63bb1700a0
2 changed files with 11 additions and 4 deletions

View File

@ -12,5 +12,7 @@ RUN yarn build
FROM lipanski/docker-static-website:latest
COPY --from=builder /app/dist .
COPY httpd.conf .
EXPOSE 3000
CMD ["/busybox", "httpd", "-f", "-v", "-p", "3000", "-c", "httpd.conf"]
ARG PORT=3000
EXPOSE ${PORT}
ENTRYPOINT ["/busybox", "httpd"]
CMD ["-f", "-v", "-p", "${PORT}", "-c", "httpd.conf"]

View File

@ -7,9 +7,14 @@ services:
container_name: terminal
restart: unless-stopped
ports:
- 3000:3000
- '0.0.0.0:${PORT:-3000}:${PORT:-3000}'
command: >
-f
-v
-p ${PORT:-3000}
-c httpd.conf
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
test: ["CMD", "curl", "-f", "http://localhost:${PORT:-3000}"]
interval: 200s
timeout: 200s
retries: 5