Merge branch 'firefly-cron'

pull/3/head
Jef Roosens 2021-01-11 09:48:55 +01:00
commit e8e3f0e46e
4 changed files with 30 additions and 20 deletions

View File

@ -0,0 +1,9 @@
FROM jc5x/firefly-iii:latest
# Install cron & crontab
RUN apt update && \
apt install --no-install-recommends -y cron && \
echo "0 */4 * * * /usr/bin/php /var/www/html/artisan firefly-iii:cron" | crontab
# Run cron on startup
ENTRYPOINT cron && /usr/local/bin/entrypoint.sh

View File

@ -1,3 +0,0 @@
POSTGRES_DB=firefly
POSTGRES_USER=firefly
POSTGRES_PASSWORD=password

View File

@ -2,36 +2,41 @@ version: '3.3'
services:
app:
image: jc5x/firefly-iii:latest
restart: always
build:
context: '.'
dockerfile: './Dockerfile'
image: 'firefly-iii-cron:latest'
restart: 'always'
depends_on:
- db
- redis
- 'db'
- 'redis'
env_file:
- firefly.env
- '.env'
labels:
- 'com.centurylinklabs.watchtower.enable=true'
networks:
- nginx
- default
- 'nginx'
- 'default'
volumes:
- upload:/var/www/html/storage/upload
- 'upload:/var/www/html/storage/upload'
db:
image: postgres:13-alpine
restart: always
image: 'postgres:13-alpine'
restart: 'always'
env_file:
- db.env
environment:
- 'POSTGRES_DB=$DB_DATABASE'
- 'POSTGRES_PASSWORD=$DB_PASSWORD'
- 'POSTGRES_USER=$DB_USERNAME'
labels:
- 'com.centurylinklabs.watchtower.enable=true'
volumes:
- db-data:/var/lib/postgresql/data
- 'db-data:/var/lib/postgresql/data'
redis:
image: redis:6-alpine
restart: always
image: 'redis:6-alpine'
restart: 'always'
labels:
- 'com.centurylinklabs.watchtower.enable=true'
@ -39,8 +44,7 @@ services:
networks:
nginx:
external:
name: nginx
external: true
volumes:
upload: