-
-
Save stevenmunro/22305c3150a1220a9887b71a12c2ffec to your computer and use it in GitHub Desktop.
Invoice-Ninja for Rancher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
app: | |
image: invoiceninja/invoiceninja | |
environment: | |
DB_DATABASE: ninja | |
DB_HOST: mysql | |
DB_PASSWORD: pwd | |
DB_USERNAME: ninja | |
volumes: | |
- /volumes/api-invoice/config/.env:/var/www/app/.env | |
- /volumes/api-invoice/storage:/var/www/app/storage | |
- /volumes/api-invoice/logo:/var/www/app/public/logo | |
links: | |
- db:mysql | |
labels: | |
io.rancher.container.pull_image: always | |
cron: | |
image: invoiceninja/invoiceninja | |
environment: | |
DB_DATABASE: ninja | |
DB_HOST: mysql | |
DB_PASSWORD: pwd | |
DB_USERNAME: ninja | |
entrypoint: | |
- bash | |
- -c | |
- |- | |
bash -s <<EOF | |
trap "break;exit" SIGHUP SIGINT SIGTERM | |
sleep 300s | |
while /bin/true; do | |
/usr/local/bin/php /var/www/app/artisan ninja:send-invoices | |
/usr/local/bin/php /var/www/app/artisan ninja:send-reminders | |
sleep 1d | |
done | |
EOF | |
volumes: | |
- /volumes/api-invoice/config/.env:/var/www/app/.env | |
- /volumes/api-invoice/logo:/var/www/app/public/logo | |
- /volumes/api-invoice/storage:/var/www/app/storage | |
links: | |
- db:mysql | |
labels: | |
io.rancher.container.pull_image: always | |
web: | |
image: nginx | |
volumes: | |
- /volumes/api-invoice/config/nginx.conf:/etc/nginx/nginx.conf:ro | |
links: | |
- app:app | |
labels: | |
io.rancher.container.pull_image: always | |
db: | |
image: mysql | |
environment: | |
MYSQL_DATABASE: ninja | |
MYSQL_PASSWORD: pwd | |
MYSQL_ROOT_PASSWORD: pwd | |
MYSQL_USER: ninja | |
volumes: | |
- /volumes/api-invoice/db:/var/lib/mysql | |
labels: | |
io.rancher.container.pull_image: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
app: | |
scale: 1 | |
start_on_create: true | |
cron: | |
scale: 1 | |
start_on_create: true | |
web: | |
scale: 1 | |
start_on_create: true | |
db: | |
scale: 1 | |
start_on_create: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment