feat: Production Deploy

This commit is contained in:
2026-01-16 18:43:15 -05:00
parent 9920d0a8d6
commit 441641f1fe
2 changed files with 95 additions and 0 deletions

28
.env Normal file
View File

@@ -0,0 +1,28 @@
# Naliia
NALIIA_IMAGE=gitea.onecluster.org/aserrador/naliia:latest
# TRYTOND information
TRYTOND_VERSION=7.6
TRYTON_PORT=8000
TRYTON_ADMIN_EMAIL=admin@admin.co
TRYTONPASSFILE=/etc/trytond_admin_pass.conf
DB_HOSTNAME="db"
POSTGRES_DB="naliia"
POSTGRES_USER="postgres"
POSTGRES_PASSWORD="SUp3r-pass*DB"
# SMTP
SMTP="True"
SMTP_TYPE="smtps+ssl"
SMTP_USER="user"
SMTP_PASSWORD="passsword"
SMTP_DOMAIN="domain.com"
SMTP_PORT=465
SMTP_FROM="Company CO"
SMTP_EMAIL="domain@domain.com"
# NGINX
SERVER_NAME="tryton.domain.com"
NGINX_PORT=10000
VARIABLE=$

67
docker-compose.yml Normal file
View File

@@ -0,0 +1,67 @@
services:
db:
image: postgres
hostname: ${DB_HOSTNAME}
volumes:
- postgres:/var/lib/postgresql
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
env_file:
- .env
tryton:
image: ${NALIIA_IMAGE}
working_dir: /app
volumes:
- var:/var
- attachment:/mnt/attachment
ports:
- "${TRYTON_PORT:-8000}:8000"
environment:
- TRYTOND_DATABASE_URI=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOSTNAME}:5432/
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
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=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOSTNAME}:5432/
env_file:
- .env
cron:
image: ${NALIIA_IMAGE}
working_dir: /app
depends_on:
tryton:
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=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOSTNAME}:5432/
env_file:
- .env
volumes:
postgres:
var:
attachment: