created invoice ninja
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
services:
|
||||
db:
|
||||
image: mysql:${IN_DB_VERSION:-8}
|
||||
container_name: invoice-ninja-db
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
||||
MYSQL_DATABASE: ${DB_DATABASE:-invoiceninja}
|
||||
MYSQL_USER: ${DB_USERNAME:-invoiceninja}
|
||||
MYSQL_PASSWORD: ${DB_PASSWORD}
|
||||
volumes:
|
||||
- in-db:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_ROOT_PASSWORD}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512m
|
||||
restart: unless-stopped
|
||||
|
||||
app:
|
||||
image: invoiceninja/invoiceninja:${IN_VERSION:-5}
|
||||
container_name: invoice-ninja-app
|
||||
env_file: .env
|
||||
volumes:
|
||||
- in-public:/var/www/app/public
|
||||
- in-storage:/var/www/app/storage
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "php", "artisan", "--version"]
|
||||
interval: 30s
|
||||
timeout: 15s
|
||||
retries: 5
|
||||
start_period: 90s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512m
|
||||
restart: unless-stopped
|
||||
|
||||
scheduler:
|
||||
image: invoiceninja/invoiceninja:${IN_VERSION:-5}
|
||||
container_name: invoice-ninja-scheduler
|
||||
env_file: .env
|
||||
entrypoint: ""
|
||||
command: ["sh", "-c", "while true; do php /var/www/app/artisan schedule:run --no-interaction; sleep 60; done"]
|
||||
volumes:
|
||||
- in-public:/var/www/app/public
|
||||
- in-storage:/var/www/app/storage
|
||||
depends_on:
|
||||
app:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 256m
|
||||
restart: unless-stopped
|
||||
|
||||
queue:
|
||||
image: invoiceninja/invoiceninja:${IN_VERSION:-5}
|
||||
container_name: invoice-ninja-queue
|
||||
env_file: .env
|
||||
entrypoint: ""
|
||||
command: ["php", "/var/www/app/artisan", "queue:work", "--sleep=3", "--tries=3"]
|
||||
volumes:
|
||||
- in-public:/var/www/app/public
|
||||
- in-storage:/var/www/app/storage
|
||||
depends_on:
|
||||
app:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 256m
|
||||
restart: unless-stopped
|
||||
|
||||
nginx:
|
||||
image: nginx:${IN_NGINX_VERSION:-alpine}
|
||||
container_name: invoice-ninja-nginx
|
||||
volumes:
|
||||
- in-public:/var/www/app/public
|
||||
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
ports:
|
||||
- ${IN_PORT:-8080}:80
|
||||
depends_on:
|
||||
app:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "[ -f /var/run/nginx.pid ] && kill -0 $(cat /var/run/nginx.pid) || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 128m
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
in-public:
|
||||
name: invoice-ninja-public
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: nfs
|
||||
o: "addr=${IN_NFS_SERVER},rw,noatime,rsize=65536,wsize=65536,timeo=600,nfsvers=4"
|
||||
device: "${IN_NFS_PUBLIC_DEVICE}"
|
||||
in-storage:
|
||||
name: invoice-ninja-storage
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: nfs
|
||||
o: "addr=${IN_NFS_SERVER},rw,noatime,rsize=65536,wsize=65536,timeo=600,nfsvers=4"
|
||||
device: "${IN_NFS_STORAGE_DEVICE}"
|
||||
in-db:
|
||||
name: invoice-ninja-db
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: nfs
|
||||
o: "addr=${IN_NFS_SERVER},rw,noatime,rsize=65536,wsize=65536,timeo=600,nfsvers=4"
|
||||
device: "${IN_NFS_DB_DEVICE}"
|
||||
Reference in New Issue
Block a user