Merge branch 'firefly-cron'
commit
e8e3f0e46e
|
@ -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
|
|
@ -1,3 +0,0 @@
|
||||||
POSTGRES_DB=firefly
|
|
||||||
POSTGRES_USER=firefly
|
|
||||||
POSTGRES_PASSWORD=password
|
|
|
@ -2,36 +2,41 @@ version: '3.3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: jc5x/firefly-iii:latest
|
build:
|
||||||
restart: always
|
context: '.'
|
||||||
|
dockerfile: './Dockerfile'
|
||||||
|
image: 'firefly-iii-cron:latest'
|
||||||
|
restart: 'always'
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- 'db'
|
||||||
- redis
|
- 'redis'
|
||||||
env_file:
|
env_file:
|
||||||
- firefly.env
|
- '.env'
|
||||||
labels:
|
labels:
|
||||||
- 'com.centurylinklabs.watchtower.enable=true'
|
- 'com.centurylinklabs.watchtower.enable=true'
|
||||||
networks:
|
networks:
|
||||||
- nginx
|
- 'nginx'
|
||||||
- default
|
- 'default'
|
||||||
volumes:
|
volumes:
|
||||||
- upload:/var/www/html/storage/upload
|
- 'upload:/var/www/html/storage/upload'
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:13-alpine
|
image: 'postgres:13-alpine'
|
||||||
restart: always
|
restart: 'always'
|
||||||
|
|
||||||
env_file:
|
environment:
|
||||||
- db.env
|
- 'POSTGRES_DB=$DB_DATABASE'
|
||||||
|
- 'POSTGRES_PASSWORD=$DB_PASSWORD'
|
||||||
|
- 'POSTGRES_USER=$DB_USERNAME'
|
||||||
labels:
|
labels:
|
||||||
- 'com.centurylinklabs.watchtower.enable=true'
|
- 'com.centurylinklabs.watchtower.enable=true'
|
||||||
volumes:
|
volumes:
|
||||||
- db-data:/var/lib/postgresql/data
|
- 'db-data:/var/lib/postgresql/data'
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:6-alpine
|
image: 'redis:6-alpine'
|
||||||
restart: always
|
restart: 'always'
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
- 'com.centurylinklabs.watchtower.enable=true'
|
- 'com.centurylinklabs.watchtower.enable=true'
|
||||||
|
@ -39,8 +44,7 @@ services:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
nginx:
|
nginx:
|
||||||
external:
|
external: true
|
||||||
name: nginx
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
upload:
|
upload:
|
||||||
|
|
Reference in New Issue