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.
/docker/docker-compose.yml
file; add your SMTP credentials
- and any other needed environment variables./docker/.env
file.
+ As a minimum, set the following fields:DEFAULT_FROM_EMAIL
– the "From:" address for outbound emailsEMAIL_HOST
– the SMTP serverEMAIL_HOST_PASSWORD
– the SMTP passwordEMAIL_HOST_USER
– the SMTP usernameSECRET_KEY
– secures HTTP sessions, set to a random valueCreate and start containers:
$ cd docker
diff --git a/templates/docs/self_hosted_docker.md b/templates/docs/self_hosted_docker.md
index 4b8ec392..863afdaa 100644
--- a/templates/docs/self_hosted_docker.md
+++ b/templates/docs/self_hosted_docker.md
@@ -16,8 +16,13 @@ SSL-terminating load balancer or reverse proxy in front of it.
* Grab the Healthchecks source code
[from the Github repository](https://github.com/healthchecks/healthchecks).
-* Edit the `/docker/docker-compose.yml` file; add your SMTP credentials
- and any other needed [environment variables](../self_hosted_configuration/).
+* Add your [configuration](../self_hosted_configuration/) in the `/docker/.env` file.
+ As a minimum, set the following fields:
+ * `DEFAULT_FROM_EMAIL` – the "From:" address for outbound emails
+ * `EMAIL_HOST` – the SMTP server
+ * `EMAIL_HOST_PASSWORD` – the SMTP password
+ * `EMAIL_HOST_USER` – the SMTP username
+ * `SECRET_KEY` – secures HTTP sessions, set to a random value
* Create and start containers:
$ cd docker