95 lines
2.2 KiB
YAML
95 lines
2.2 KiB
YAML
---
|
|
version: "3.8"
|
|
|
|
services:
|
|
nginx:
|
|
image: "nginx:stable"
|
|
configs:
|
|
- source: nginx-conf-v1
|
|
target: /etc/nginx/nginx.conf
|
|
volumes:
|
|
- "public:/var/www/app/public"
|
|
networks:
|
|
- proxy
|
|
- backchannelnet
|
|
depends_on:
|
|
- invoiceninja
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
update_config:
|
|
failure_action: rollback
|
|
placement:
|
|
constraints:
|
|
- node.role == manager
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.services.invoiceninja.loadbalancer.server.port=80"
|
|
- "traefik.http.routers.invoiceninja.rule=Host(`invoices.zzp.decentral1.se`)"
|
|
- "traefik.http.routers.invoiceninja.entrypoints=web-secure"
|
|
- "traefik.http.routers.invoiceninja.tls.certresolver=production"
|
|
|
|
invoiceninja:
|
|
image: "invoiceninja/invoiceninja:4.6.0"
|
|
volumes:
|
|
- "public:/var/www/app/public"
|
|
- "storage:/var/www/app/storage"
|
|
environment:
|
|
- API_SECRET=Z3kLyTUlwgd7mIybDNXEec9RGxFtrDNE
|
|
- APP_CIPHER=AES-256-CBC
|
|
- APP_DEBUG=false
|
|
- APP_ENV=production
|
|
- APP_KEY=8nIPbC6HiSp1hyA5KfANWTJQfcHzLWyp
|
|
- APP_LOCALE=en
|
|
- APP_URL=https://invoices.zzp.decentral1.se
|
|
- DB_DATABASE=ninja
|
|
- DB_HOST=mariadb
|
|
- DB_PASSWORD=6KIc1aZdylJQfXxCE3fTj49I2KVwsqYp
|
|
- DB_STRICT=false
|
|
- DB_TYPE=mysql
|
|
- DB_USERNAME=ninja
|
|
- LOG=single
|
|
- REQUIRE_HTTPS=false
|
|
- SESSION_ENCRYPT=true
|
|
- SESSION_SECURE=true
|
|
- TRUSTED_PROXIES="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
|
|
depends_on:
|
|
- mariadb
|
|
networks:
|
|
- backchannelnet
|
|
|
|
mariadb:
|
|
image: "mariadb:10.5"
|
|
environment:
|
|
- MYSQL_DATABASE=ninja
|
|
- MYSQL_USER=ninja
|
|
- MYSQL_PASSWORD_FILE=/run/secrets/mariadb-user-passwd-v1
|
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mariadb-root-passwd-v1
|
|
secrets:
|
|
- mariadb-root-passwd-v1
|
|
- mariadb-user-passwd-v1
|
|
volumes:
|
|
- "mariadb:/var/lib/mariadb"
|
|
networks:
|
|
- backchannelnet
|
|
|
|
volumes:
|
|
mariadb:
|
|
public:
|
|
storage:
|
|
|
|
networks:
|
|
proxy:
|
|
external: true
|
|
backchannelnet:
|
|
|
|
secrets:
|
|
mariadb-root-passwd-v1:
|
|
external: true
|
|
mariadb-user-passwd-v1:
|
|
external: true
|
|
|
|
configs:
|
|
nginx-conf-v1:
|
|
file: nginx.conf
|