Files
Personal-Rancher-Catalog/templates/invoice-ninja/0/docker-compose.yml
WilliamMiceli c2bb2b9b64 Maybe Not
2018-06-24 19:13:35 -04:00

56 lines
1.4 KiB
YAML

version: '2'
services:
app:
image: invoiceninja/invoiceninja
env_file: .env
labels:
io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE}
io.rancher.sidekicks: cron, web
links:
- db:mysql
restart: on-failure
volumes:
- ${STORAGE_BASE_DIR}${LOGO_DIR}:/var/www/app/public/logo
- ${STORAGE_BASE_DIR}${STORAGE_DIR}:/var/www/app/storage
- ${STORAGE_BASE_DIR}${CONFIG_DIR}/.env:/var/www/app/.env
cron:
image: invoiceninja/invoiceninja
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 1h
done
EOF'
env_file: .env
labels:
io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE}
links:
- db:mysql
restart: on-failure
volumes_from:
- app
db:
image: mysql
env_file: .env
labels:
io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE}
restart: on-failure
volumes:
- ${STORAGE_BASE_DIR}${DB_DIR}:/var/lib/mysql
web:
image: nginx
labels:
io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE}
links:
- app
ports:
- "${WEB_PORT}:80"
restart: on-failure
volumes:
- ${STORAGE_BASE_DIR}${CONFIG_DIR}/nginx.conf:/etc/nginx/nginx.conf:ro
volumes_from:
- app