Files
Personal-Rancher-Catalog/templates/invoice-ninja/0/docker-compose.yml
WilliamMiceli a1d417538f No More .env
2018-06-24 19:21:56 -04:00

71 lines
1.8 KiB
YAML

version: '2'
services:
app:
image: invoiceninja/invoiceninja
environment:
- APP_DEBUG='0'
- APP_URL='http://localhost:8000'
- APP_CIPHER='AES-256-CBC'
- 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_DEBUG='0'
- APP_URL='http://localhost:8000'
- APP_CIPHER='AES-256-CBC'
- 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