From 98b1e13aa1aac070032555cb8d2667aed1a114bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Tue, 26 Jan 2021 14:00:54 +0200 Subject: [PATCH] Update the Docker Compose sample to use an .env file --- docker/.env | 55 ++++++++++++++++++++++++++ docker/docker-compose.yml | 18 ++------- templates/docs/self_hosted_docker.html | 11 +++++- templates/docs/self_hosted_docker.md | 9 ++++- 4 files changed, 75 insertions(+), 18 deletions(-) create mode 100644 docker/.env diff --git a/docker/.env b/docker/.env new file mode 100644 index 00000000..b9d7625f --- /dev/null +++ b/docker/.env @@ -0,0 +1,55 @@ +ALLOWED_HOSTS=localhost +APPRISE_ENABLED=False +DB=postgres +DB_CONN_MAX_AGE=0 +DB_HOST=db +DB_NAME=hc +DB_PASSWORD=fixme-postgres-password +DB_PORT=5432 +DB_SSLMODE=prefer +DB_TARGET_SESSION_ATTRS=read-write +DB_USER=postgres +DEBUG=False +DEFAULT_FROM_EMAIL=healthchecks@example.org +DISCORD_CLIENT_ID= +DISCORD_CLIENT_SECRET= +EMAIL_HOST= +EMAIL_HOST_PASSWORD= +EMAIL_HOST_USER= +EMAIL_PORT=587 +EMAIL_USE_TLS=True +EMAIL_USE_VERIFICATION=True +LINENOTIFY_CLIENT_ID= +LINENOTIFY_CLIENT_SECRET= +MASTER_BADGE_LABEL=Mychecks +MATRIX_ACCESS_TOKEN= +MATRIX_HOMESERVER= +MATRIX_USER_ID= +PD_VENDOR_KEY= +PING_BODY_LIMIT=10000 +PING_EMAIL_DOMAIN=localhost +PING_ENDPOINT=http://localhost:8000/ping/ +PUSHBULLET_CLIENT_ID= +PUSHBULLET_CLIENT_SECRET= +PUSHOVER_API_TOKEN= +PUSHOVER_EMERGENCY_EXPIRATION=86400 +PUSHOVER_EMERGENCY_RETRY_DELAY=300 +PUSHOVER_SUBSCRIPTION_URL= +REGISTRATION_OPEN=True +REMOTE_USER_HEADER= +RP_ID= +SECRET_KEY= +SHELL_ENABLED=False +SIGNAL_CLI_ENABLED=False +SITE_NAME=Mychecks +SITE_ROOT=http://localhost:8000 +SLACK_CLIENT_ID= +SLACK_CLIENT_SECRET= +TELEGRAM_BOT_NAME=ExampleBot +TELEGRAM_TOKEN= +TRELLO_APP_KEY= +TWILIO_ACCOUNT= +TWILIO_AUTH= +TWILIO_FROM= +TWILIO_USE_WHATSAPP=False +USE_PAYMENTS=False diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index e4bb5da1..52a6c42b 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -8,24 +8,14 @@ services: volumes: - db-data:/var/lib/postgresql environment: - - POSTGRES_DB=hc - - POSTGRES_PASSWORD=fixme-postgres-password + - POSTGRES_DB=$DB_NAME + - POSTGRES_PASSWORD=$DB_PASSWORD web: build: context: .. dockerfile: docker/Dockerfile - environment: - - DEBUG=False - - DB=postgres - - DB_HOST=db - - DB_PORT=5432 - - DB_PASSWORD=fixme-postgres-password - - DEFAULT_FROM_EMAIL=healthchecks@example.org - - EMAIL_HOST=fixme-smtp-server.example.org - - EMAIL_HOST_USER=fixme-smtp-username - - EMAIL_HOST_PASSWORD=fixme-smtp-password - - SECRET_KEY=fixme-secret-key - - SITE_ROOT=http://localhost:8000 + env_file: + - .env ports: - 8000:8000 depends_on: diff --git a/templates/docs/self_hosted_docker.html b/templates/docs/self_hosted_docker.html index 19d5b63d..bc7835b4 100644 --- a/templates/docs/self_hosted_docker.html +++ b/templates/docs/self_hosted_docker.html @@ -12,8 +12,15 @@ SSL-terminating load balancer or reverse proxy in front of it.