Skip to content

Instantly share code, notes, and snippets.

@dm
Created May 26, 2020 00:23
Show Gist options
  • Save dm/50c43fb536406f37a1555f0ed6f4d29c to your computer and use it in GitHub Desktop.
Save dm/50c43fb536406f37a1555f0ed6f4d29c to your computer and use it in GitHub Desktop.
Firefly-iii docker-compose
---
version: '3'
networks:
traefik_network:
external:
name: homelabos_traefik
services:
app:
image: jc5x/firefly-iii:stable
restart: unless-stopped
environment:
# https://github.com/firefly-iii/firefly-iii/blob/master/app/Providers/AppServiceProvider.php#L42
# This fixes issue with SSL termination at traefik, and forces HTTPS URIs everywhere
# Using heroku as APP_ENV, just to ensure generated URIs start with HTTPS, leveraging:
- APP_ENV=heroku
- APP_KEY=CENSOREDGENERAGEDAPPKEY
- APP_URL=https://firefly.example.com
- DB_CONNECTION=pgsql
- DB_DATABASE=firefly_db
- DB_HOST=db
- DB_PASSWORD=CENSOREDRANDOMPASSWORD
- DB_PORT=5432
- DB_USERNAME=firefly_db
- MAIL_DRIVER=smtp
- MAIL_ENCRYPTION=tls
- [email protected]
- MAIL_HOST=smtp.gmail.com
- MAIL_PASSWORD=PASSWORD
- MAIL_PORT=587
- [email protected]
- SEND_TELEMETRY=false
- ServerName=firefly.example.com
- TZ=Europe/London
depends_on:
- db
networks:
- traefik_network
volumes:
- '/var/homelabos/firefly/export:/var/www/firefly-iii/storage/export'
- '/var/homelabos/firefly/upload:/var/www/firefly-iii/storage/upload'
db:
image: "postgres:12"
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=CENSOREDRANDOMPASSWORD
- POSTGRES_USER=firefly_db
- POSTGRES_DB=firefly_db
networks:
- traefik_network
volumes:
- "/var/homelabos/firefly/db:/var/lib/postgresql/data"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment