89 lines
2.5 KiB
YAML
89 lines
2.5 KiB
YAML
services:
|
|
db:
|
|
image: postgres
|
|
hostname: ${DB_HOSTNAME}
|
|
volumes:
|
|
- postgres:/var/lib/postgresql
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-naliia}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-SUp3r-pass*DB}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-naliia}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
env_file:
|
|
- .env
|
|
|
|
tryton:
|
|
image: ${NALIIA_IMAGE}
|
|
working_dir: /app
|
|
command: /bin/bash /opt/start.sh
|
|
volumes:
|
|
- var:/var
|
|
- attachment:/mnt/attachment
|
|
environment:
|
|
TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://${POSTGRES_USER:-naliia}:${POSTGRES_PASSWORD:-SUp3r-pass*DB}@${DB_HOSTNAME:-db}:5432/}
|
|
NALIIA_IMAGE: ${NALIIA_IMAGE:-gitea.onecluster.org/aserrador/naliia:latest}
|
|
EMAIL: ${EMAIL:-admin@admin.org}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: curl --fail localhost:8000 || exit 1
|
|
interval: 30s
|
|
retries: 5
|
|
start_period: 30s
|
|
timeout: 20s
|
|
env_file:
|
|
- .env
|
|
|
|
worker:
|
|
image: ${NALIIA_IMAGE}
|
|
working_dir: /app
|
|
depends_on:
|
|
tryton:
|
|
condition: service_healthy
|
|
db:
|
|
condition: service_healthy
|
|
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-worker -c /etc/trytond_worker.conf -d ${POSTGRES_DB} --logconf /etc/trytond_worker_logging.conf"]
|
|
volumes:
|
|
- .:/app
|
|
environment:
|
|
TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://${POSTGRES_USER:-naliia}:${POSTGRES_PASSWORD:-SUp3r-pass*DB}@${DB_HOSTNAME:-db}:5432/}
|
|
env_file:
|
|
- .env
|
|
|
|
cron:
|
|
image: ${NALIIA_IMAGE}
|
|
working_dir: /app
|
|
depends_on:
|
|
tryton:
|
|
condition: service_healthy
|
|
db:
|
|
condition: service_healthy
|
|
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-cron -c /etc/trytond.conf -d ${POSTGRES_DB} --logconf /etc/trytond_cron_logging.conf"]
|
|
volumes:
|
|
- .:/app
|
|
environment:
|
|
TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://${POSTGRES_USER:-naliia}:${POSTGRES_PASSWORD:-SUp3r-pass*DB}@${DB_HOSTNAME:-db}:5432/}
|
|
env_file:
|
|
- .env
|
|
nginx:
|
|
image: nginx:1.23.3
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf.template
|
|
ports:
|
|
- "${NGINX_PORT:-10000}:${NGINX_PORT:-10000}"
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- tryton
|
|
- db
|
|
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/nginx.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
|
|
|
|
volumes:
|
|
postgres:
|
|
var:
|
|
attachment:
|