Browse Source

Update the Docker Compose sample to use an .env file

pull/474/head
Pēteris Caune 4 years ago
parent
commit
98b1e13aa1
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
4 changed files with 75 additions and 18 deletions
  1. +55
    -0
      docker/.env
  2. +4
    -14
      docker/docker-compose.yml
  3. +9
    -2
      templates/docs/self_hosted_docker.html
  4. +7
    -2
      templates/docs/self_hosted_docker.md

+ 55
- 0
docker/.env View File

@ -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
[email protected]
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

+ 4
- 14
docker/docker-compose.yml View File

@ -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
- [email protected]
- 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:


+ 9
- 2
templates/docs/self_hosted_docker.html View File

@ -12,8 +12,15 @@ SSL-terminating load balancer or reverse proxy in front of it.</p>
<ul>
<li>Grab the Healthchecks source code
<a href="https://github.com/healthchecks/healthchecks">from the Github repository</a>.</li>
<li>Edit the <code>/docker/docker-compose.yml</code> file; add your SMTP credentials
and any other needed <a href="../self_hosted_configuration/">environment variables</a>.</li>
<li>Add your <a href="../self_hosted_configuration/">configuration</a> in the <code>/docker/.env</code> file.
As a minimum, set the following fields:<ul>
<li><code>DEFAULT_FROM_EMAIL</code> – the "From:" address for outbound emails</li>
<li><code>EMAIL_HOST</code> – the SMTP server</li>
<li><code>EMAIL_HOST_PASSWORD</code> – the SMTP password</li>
<li><code>EMAIL_HOST_USER</code> – the SMTP username</li>
<li><code>SECRET_KEY</code> – secures HTTP sessions, set to a random value</li>
</ul>
</li>
<li>
<p>Create and start containers:</p>
<div class="highlight"><pre><span></span><code>$ <span class="nb">cd</span> docker


+ 7
- 2
templates/docs/self_hosted_docker.md View File

@ -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


Loading…
Cancel
Save