Files
fireflies/docker-compose.yml
2025-12-08 01:18:40 +00:00

91 lines
2.1 KiB
YAML

version: "3.8"
services:
app:
image: fireflyiii/core:latest
# hostname: app
volumes:
- firefly_iii_upload:/var/www/html/storage/upload
env_file: stack.env
networks:
- net
- public
- badge-net
# ports:
# - "80:8080"
depends_on:
- db
deploy:
replicas: 1
restart_policy:
condition: any
delay: 5s
max_attempts: 3
placement:
constraints:
- node.hostname == crackbox
labels:
- "traefik.enable=true"
- "traefik.http.routers.fireflies.rule=Host(`fireflies.lab`)"
- "traefik.http.routers.fireflies.entrypoints=web"
- "traefik.http.routers.fireflies.tls=false"
- "traefik.http.services.fireflies.loadbalancer.server.port=8080"
- "traefik.swarm.network=public"
db:
image: postgres:16
# hostname: db
env_file: stack.env
networks:
- net
volumes:
- firefly_iii_pgdb:/var/lib/postgresql/data
deploy:
replicas: 1
restart_policy:
condition: any
delay: 5s
max_attempts: 3
placement:
constraints:
- node.hostname == crackbox
cron:
# To make this work, set STATIC_CRON_TOKEN in your .env file or as an environment variable
# The STATIC_CRON_TOKEN must be *exactly* 32 characters long
image: alpine
env_file: stack.env
command: >
sh -c "apk add tzdata &&
(ln -s /usr/share/zoneinfo/$$TZ /etc/localtime || true) &&
echo \"0 3 * * * wget -qO- http://app:8080/api/v1/cron/$$STATIC_CRON_TOKEN;echo\" | crontab - &&
crond -f -L /dev/stdout"
networks:
- net
depends_on:
- app
deploy:
replicas: 1
restart_policy:
condition: any
delay: 5s
max_attempts: 3
placement:
constraints:
- node.hostname == crackbox
volumes:
firefly_iii_upload:
name: firefly_iii_upload
firefly_iii_pgdb:
name: firefly_iii_pgdb
networks:
net:
driver: overlay
attachable: true
public:
external: true
badge-net:
external: true