Files
Personal-Rancher-Catalog/templates/InvoiceNinja/0/docker-compose.yml
2018-06-27 12:20:10 -04:00

75 lines
1.9 KiB
YAML

version: '2'
services:
app:
image: invoiceninja/invoiceninja
environment:
- APP_ENV: production
- APP_DEBUG: false
- APP_URL: http://localhost:${WEB_PORT}
- APP_CIPHER: AES-128-CBC
- APP_KEY: ${APP_KEY}
- DB_HOST: mysql
- DB_DATABASE: ninja
- DB_USERNAME: root
- DB_PASSWORD: ninjaPass
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
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'
environment:
- APP_ENV: production
- APP_DEBUG: false
- APP_URL: http://localhost:${WEB_PORT}
- APP_CIPHER: AES-128-CBC
- APP_KEY: ${APP_KEY}
- DB_HOST: mysql
- DB_DATABASE: ninja
- DB_USERNAME: root
- DB_PASSWORD: ninjaPass
labels:
io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE}
links:
- db:mysql
restart: on-failure
volumes_from:
- app
db:
image: mysql
environment:
- MYSQL_DATABASE: ninja
- MYSQL_ROOT_PASSWORD: ninjaPass
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