2024-02-23 09:09:42 +00:00
|
|
|
# documentation: https://firefly-iii.org
|
|
|
|
# slogan: A personal finances manager that can help you save money.
|
|
|
|
# tags: finance, money, personal, manager
|
|
|
|
# logo: svgs/firefly.svg
|
2024-03-12 14:09:24 +00:00
|
|
|
# port: 8080
|
2024-02-23 09:09:42 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
firefly:
|
|
|
|
image: fireflyiii/core:latest
|
|
|
|
environment:
|
2024-03-12 14:09:24 +00:00
|
|
|
- SERVICE_FQDN_FIREFLY_8080
|
2024-02-23 09:09:42 +00:00
|
|
|
- APP_KEY=$SERVICE_BASE64_APPKEY
|
|
|
|
- DB_HOST=mysql
|
|
|
|
- DB_PORT=3306
|
|
|
|
- DB_CONNECTION=mysql
|
|
|
|
- DB_DATABASE=${MYSQL_DATABASE:-firefly}
|
|
|
|
- DB_USERNAME=$SERVICE_USER_MYSQL
|
|
|
|
- DB_PASSWORD=$SERVICE_PASSWORD_MYSQL
|
|
|
|
- STATIC_CRON_TOKEN=$SERVICE_BASE64_CRONTOKEN
|
2024-02-26 07:52:17 +00:00
|
|
|
- TRUSTED_PROXIES=*
|
2024-02-23 09:09:42 +00:00
|
|
|
volumes:
|
|
|
|
- firefly-upload:/var/www/html/storage/upload
|
|
|
|
healthcheck:
|
2024-05-17 08:11:55 +00:00
|
|
|
test: ["CMD", "curl", "-f", "http://127.0.0.1:8080"]
|
2024-02-23 09:09:42 +00:00
|
|
|
interval: 5s
|
|
|
|
timeout: 20s
|
|
|
|
retries: 10
|
|
|
|
depends_on:
|
|
|
|
mysql:
|
|
|
|
condition: service_healthy
|
|
|
|
mysql:
|
|
|
|
image: mariadb:lts
|
|
|
|
environment:
|
|
|
|
- MYSQL_USER=${SERVICE_USER_MYSQL}
|
|
|
|
- MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL}
|
|
|
|
- MYSQL_DATABASE=${MYSQL_DATABASE:-firefly}
|
|
|
|
- MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_MYSQLROOT}
|
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
[
|
|
|
|
"CMD",
|
2024-06-09 11:14:07 +00:00
|
|
|
"mariadb-admin",
|
2024-02-23 09:09:42 +00:00
|
|
|
"ping",
|
|
|
|
"-h",
|
2024-05-17 08:11:55 +00:00
|
|
|
"127.0.0.1",
|
2024-02-23 09:09:42 +00:00
|
|
|
"-uroot",
|
|
|
|
"-p${SERVICE_PASSWORD_MYSQLROOT}",
|
|
|
|
]
|
|
|
|
interval: 5s
|
|
|
|
timeout: 20s
|
|
|
|
retries: 10
|
|
|
|
volumes:
|
|
|
|
- firefly-mysql-data:/var/lib/mysql
|
2024-02-26 07:52:17 +00:00
|
|
|
cron:
|
|
|
|
image: alpine
|
|
|
|
entrypoint: ["/entrypoint.sh"]
|
|
|
|
volumes:
|
|
|
|
- type: bind
|
|
|
|
source: ./entrypoint.sh
|
|
|
|
target: /entrypoint.sh
|
|
|
|
content: |
|
|
|
|
#!/bin/sh
|
|
|
|
# Substitute the environment variable into the cron command
|
|
|
|
CRON_COMMAND="0 3 * * * wget -qO- http://firefly:8080/api/v1/cron/${STATIC_CRON_TOKEN}"
|
|
|
|
# Add the cron command to the crontab
|
|
|
|
echo "$CRON_COMMAND" | crontab -
|
|
|
|
# Start the cron daemon in the foreground with logging to stdout
|
|
|
|
crond -f -L /dev/stdout
|
|
|
|
environment:
|
|
|
|
- STATIC_CRON_TOKEN=$SERVICE_BASE64_CRONTOKEN
|