Skip to content

Commit

Permalink
Use configurable email for Caddy
Browse files Browse the repository at this point in the history
- Fix not-required configs
  • Loading branch information
thenav56 committed Apr 18, 2024
1 parent 79d398d commit 63d1b08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
16 changes: 4 additions & 12 deletions deploy-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,13 @@ x-server: &base_server_setup
CELERY_REDIS_URL: ${CELERY_REDIS_URL:-redis://redis:6379/1}
DJANGO_CACHE_REDIS_URL: ${DJANGO_CACHE_REDIS_URL:-redis://redis:6379/2}
TEST_DJANGO_CACHE_REDIS_URL: ${TEST_DJANGO_CACHE_REDIS_URL:-redis://redis:6379/12}
DJANGO_STATIC_ROOT: /assets/static
DJANGO_MEDIA_ROOT: /assets/media
# Sentry
SENTRY_DSN: ${DJANGO_SENTRY_DSN?err}
SENTRY_SAMPLE_RATE: ${DJANGO_SENTRY_SAMPLE_RATE:-0.2}
env_file:
# Provide additional environment variables using .env file
- .env
volumes:
- backend-media:/assets/media
- backend-static:/assets/static
- ipython_data_local:/root/.ipython/profile_default # persist ipython data, including ipython history
restart: unless-stopped
Expand Down Expand Up @@ -176,13 +173,11 @@ services:
# Caddy config volumes
# -- Static files
- client-static:/app-assests/client-static:ro
- backend-static:/app-assests/backend-static:ro
# -- Media files
- backend-media:/app-assests/backend-media:ro
environment:
- CADDY_BACKEND_HOST=${CADDY_BACKEND_HOST?err}
- CADDY_CLIENT_HOST=${CADDY_CLIENT_HOST?err}
- CADDY_CLIENT_ENKETO_HOST=${CADDY_CLIENT_ENKETO_HOST?err}
CADDY_EMAIL: ${SUPPORT_EMAIL?err}
CADDY_BACKEND_HOST: ${CADDY_BACKEND_HOST?err}
CADDY_CLIENT_HOST: ${CADDY_CLIENT_HOST?err}
CADDY_CLIENT_ENKETO_HOST: ${CADDY_CLIENT_ENKETO_HOST?err}
ports:
- 80:80
- 443:443
Expand All @@ -198,10 +193,7 @@ services:

volumes:
# Static files
backend-static:
client-static:
# Media files
backend-media:
# DB
postgres-data15:
redis-data:
Expand Down
2 changes: 1 addition & 1 deletion deploy/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
email [email protected]
email {$CADDY_EMAIL}
}

{$CADDY_BACKEND_HOST} {
Expand Down

0 comments on commit 63d1b08

Please sign in to comment.