mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
73 lines
1.6 KiB
YAML
73 lines
1.6 KiB
YAML
version: '3.6'
|
||
|
||
volumes:
|
||
db:
|
||
storage:
|
||
logo:
|
||
public:
|
||
|
||
# uncomment if you want to use external network (example network: "web")
|
||
#networks:
|
||
# web:
|
||
# external: true
|
||
|
||
services:
|
||
db:
|
||
image: mysql:5
|
||
env_file: .env
|
||
restart: always
|
||
volumes:
|
||
- db:/var/lib/mysql
|
||
networks:
|
||
- default
|
||
|
||
app:
|
||
image: invoiceninja/invoiceninja
|
||
env_file: .env
|
||
restart: always
|
||
depends_on:
|
||
- db
|
||
volumes:
|
||
- storage:/var/www/app/storage
|
||
- logo:/var/www/app/public/logo
|
||
- public:/var/www/app/public
|
||
networks:
|
||
- default
|
||
|
||
web:
|
||
image: nginx:1
|
||
volumes:
|
||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||
- storage:/var/www/app/storage
|
||
- logo:/var/www/app/public/logo
|
||
- public:/var/www/app/public
|
||
expose: # Expose ports without publishing them to the host machine - they’ll only be accessible to linked services.
|
||
- "80"
|
||
depends_on:
|
||
- app
|
||
ports: # Delete if you want to use reverse proxy
|
||
- 8000:80
|
||
networks:
|
||
# - web # uncomment if you want to use external network (reverse proxy for example)
|
||
- default
|
||
|
||
cron:
|
||
image: invoiceninja/invoiceninja
|
||
env_file: .env
|
||
volumes:
|
||
- storage:/var/www/app/storage
|
||
- logo:/var/www/app/public/logo
|
||
- public:/var/www/app/public
|
||
entrypoint: |
|
||
bash -c 'bash -s <<EOF
|
||
trap "break;exit" SIGHUP SIGINT SIGTERM
|
||
sleep 300s
|
||
while /bin/true; do
|
||
./artisan ninja:send-invoices
|
||
./artisan ninja:send-reminders
|
||
sleep 1d
|
||
done
|
||
EOF'
|
||
networks:
|
||
- default
|