Files
firefly/docker-compose.yml
T

119 lines
2.9 KiB
YAML

services:
app:
image: fireflyiii/core:latest
restart: unless-stopped
env_file: .env
volumes:
- firefly_upload:/var/www/html/storage/upload
networks:
- firefly
- traefik_proxy
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
labels:
- "traefik.enable=true"
- "traefik.http.routers.firefly.rule=Host(`firefly.jbnel.dev`)"
- "traefik.http.routers.firefly.entrypoints=websecure"
- "traefik.http.routers.firefly.tls.certresolver=letsencrypt"
- "traefik.http.services.firefly.loadbalancer.server.port=8080"
- "traefik.docker.network=traefik_proxy"
cron:
image: alpine:latest
restart: unless-stopped
# Calls the Firefly III cron endpoint nightly at 03:00
command: >
sh -c "echo '0 3 * * * wget -qO- http://app:8080/api/v1/cron/$${STATIC_CRON_TOKEN}'
| crontab - && crond -f -l 8"
env_file: .env
networks:
- firefly
depends_on:
app:
condition: service_healthy
importer:
image: fireflyiii/data-importer:latest
restart: unless-stopped
env_file: .env
networks:
- firefly
- traefik_proxy
depends_on:
app:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
labels:
- "traefik.enable=true"
- "traefik.http.routers.firefly-importer.rule=Host(`import.jbnel.dev`)"
- "traefik.http.routers.firefly-importer.entrypoints=websecure"
- "traefik.http.routers.firefly-importer.tls.certresolver=letsencrypt"
- "traefik.http.services.firefly-importer.loadbalancer.server.port=8080"
- "traefik.docker.network=traefik_proxy"
agent:
build: ./agent
restart: unless-stopped
env_file: .env
networks:
- firefly
depends_on:
db:
condition: service_healthy
app:
condition: service_healthy
db:
image: postgres:16-alpine
restart: unless-stopped
env_file: .env
volumes:
- firefly_db:/var/lib/postgresql/data
networks:
- firefly
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- firefly_redis:/data
networks:
- firefly
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
firefly_upload:
firefly_db:
firefly_redis:
networks:
firefly:
driver: bridge
traefik_proxy:
external: true