Skip to content

Commit

Permalink
Add env vars to caddyfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Planlos5000 committed Dec 12, 2024
1 parent 50e56b2 commit 62c96e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions deployment/docker/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
0.0.0.0:80, localhost:80, 127.0.0.1:80 {
:80 {
log {
output stdout
}
@api {
path /api*
}
reverse_proxy @api scrumlr-backend:8080
reverse_proxy @api scrumlr-backend:{$SCRUMLR_SERVER_PORT}

@frontend {
path / /static* /locales* /login* /board* /new* /timer_finished.mp3 /hotkeys.pdf /legal/* /manifest.json /service-worker.js
}
reverse_proxy @frontend scrumlr-frontend:8080
reverse_proxy @frontend scrumlr-frontend:{$SCRUMLR_LISTEN_PORT}
}
9 changes: 6 additions & 3 deletions deployment/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- "/app/main"
- "-disable-check-origin"
environment:
SCRUMLR_SERVER_PORT: "${SCRUMLR_SERVER_PORT}"
SCRUMLR_SERVER_PORT: "${SCRUMLR_SERVER_PORT:-8080}"
SCRUMLR_SERVER_NATS_URL: "${SCRUMLR_SERVER_NATS_URL}"
SCRUMLR_PRIVATE_KEY: "${SCRUMLR_PRIVATE_KEY}"
SCRUMLR_SERVER_DATABASE_URL: "postgres://${POSTGRES_USER:-scrumlr}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-scrumlr}?sslmode=disable"
Expand Down Expand Up @@ -42,7 +42,7 @@ services:
nats:
condition: service_started
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/api/health || exit 1"]
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:${SCRUMLR_SERVER_PORT:-8080}/api/health || exit 1"]
start_period: 10s
interval: 10s
timeout: 5s
Expand All @@ -57,7 +57,7 @@ services:
SCRUMLR_WEBSOCKET_URL: "${SCRUMLR_WEBSOCKET_URL}"
SCRUMLR_SHOW_LEGAL_DOCUMENTS: "${SCRUMLR_SHOW_LEGAL_DOCUMENTS}"
# Add missing frontend environment variables here
# SCRUMLR_LISTEN_PORT: "${SCRUMLR_LISTEN_PORT}"
# SCRUMLR_LISTEN_PORT: "${SCRUMLR_LISTEN_PORT:-8080}"
# SCRUMLR_ANALYTICS_DATA_DOMAIN: "${ANALYTICS_DATA_DOMAIN}"
# SCRUMLR_ANALYTICS_SRC: "${ANALYTICS_SRC}"
depends_on:
Expand Down Expand Up @@ -101,6 +101,9 @@ services:
restart: always
image: "caddy:${CADDY_VERSION:-2.9}"
container_name: caddy
environment:
SCRUMLR_SERVER_PORT: "${SCRUMLR_SERVER_PORT:-8080}"
SCRUMLR_LISTEN_PORT: "${SCRUMLR_LISTEN_PORT:-8080}"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
ports:
Expand Down

0 comments on commit 62c96e7

Please sign in to comment.