Nuevo microservicio Plugins + cambios a microservicios anteriores, creación de módulos para conexiones a bases de datos y ajustes en las variables de entorno.
89 lines
1.8 KiB
YAML
89 lines
1.8 KiB
YAML
# compose.prod.yml
|
|
# Docker Comose para entorno de producción o production.
|
|
|
|
|
|
services:
|
|
|
|
app:
|
|
build:
|
|
context: ./services/app
|
|
dockerfile: Dockerfile.production
|
|
expose:
|
|
- ${APP_PORT}
|
|
volumes:
|
|
- ./services/app:/app
|
|
env_file:
|
|
- ./services/app/.env.production
|
|
environment:
|
|
- NODE_ENV: production
|
|
networks:
|
|
net:
|
|
aliases: [app]
|
|
command: npm run start
|
|
|
|
plugins:
|
|
build:
|
|
context: ./services/plugins
|
|
dockerfile: Dockerfile.production
|
|
expose:
|
|
- ${PLUGIN_PORT}
|
|
volumes:
|
|
- ./services/plugins:/app
|
|
env_file:
|
|
- ./services/plugins/.env.production
|
|
environment:
|
|
- NODE_ENV: production
|
|
networks:
|
|
net:
|
|
aliases: [plugins]
|
|
command: npm run start
|
|
|
|
auth:
|
|
build:
|
|
context: ./services/auth
|
|
dockerfile: Dockerfile.production
|
|
expose:
|
|
- ${AUTH_PORT}
|
|
volumes:
|
|
- ./services/auth:/app
|
|
env_file:
|
|
- ./services/auth/.env.production
|
|
environment:
|
|
- NODE_ENV: production
|
|
networks:
|
|
net:
|
|
aliases: [auth]
|
|
command: npm run start
|
|
|
|
dbCore:
|
|
image: postgres:16
|
|
environment:
|
|
POSTGRES_DB: ${DB_NAME}
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASS}
|
|
volumes:
|
|
- dbCore_data:/var/lib/postgresql/data
|
|
networks:
|
|
net:
|
|
aliases: [dbCore]
|
|
|
|
dbTenants:
|
|
image: postgres:16
|
|
environment:
|
|
POSTGRES_DB: ${TENANTS_DB_NAME}
|
|
POSTGRES_USER: ${TENANTS_DB_USER}
|
|
POSTGRES_PASSWORD: ${TENANTS_DB_PASS}
|
|
volumes:
|
|
- dbTenants_data:/var/lib/postgresql/data
|
|
networks:
|
|
net:
|
|
aliases: [dbTenants]
|
|
|
|
falta implementar authentik en compose.prod.yaml
|
|
|
|
volumes:
|
|
dbCore_data:
|
|
dbTenants_data:
|
|
networks:
|
|
net:
|
|
driver: bridge |