114 lines
3.1 KiB
YAML
114 lines
3.1 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_USER: tower
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-tower_dev}
|
|
POSTGRES_DB: tower
|
|
ports:
|
|
- '5433:5432'
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U tower -d tower']
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- '6379:6379'
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
meilisearch:
|
|
image: getmeili/meilisearch:v1.11
|
|
ports:
|
|
- '7700:7700'
|
|
environment:
|
|
MEILI_NO_ANALYTICS: 'true'
|
|
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-tower_meili_dev_key}
|
|
volumes:
|
|
- meilisearch_data:/meili_data
|
|
restart: unless-stopped
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/api/Dockerfile
|
|
environment:
|
|
NODE_ENV: production
|
|
API_PORT: 3001
|
|
DATABASE_URL: postgresql://tower:${DB_PASSWORD:-tower_dev}@postgres:5432/tower
|
|
REDIS_URL: redis://redis:6379
|
|
MEILI_URL: http://meilisearch:7700
|
|
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-tower_meili_dev_key}
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-7d}
|
|
MEMBER_JWT_EXPIRES_IN: ${MEMBER_JWT_EXPIRES_IN:-30d}
|
|
BCRYPT_ROUNDS: ${BCRYPT_ROUNDS:-10}
|
|
LOG_LEVEL: ${LOG_LEVEL:-info}
|
|
WHATSAPP_SESSION_PATH: ${WHATSAPP_SESSION_PATH:-/app/sessions}
|
|
TOWER_PORTAL_BASE_URL: ${TOWER_PORTAL_BASE_URL}
|
|
SMTP_HOST: ${SMTP_HOST:-}
|
|
SMTP_PORT: ${SMTP_PORT:-587}
|
|
SMTP_SECURE: ${SMTP_SECURE:-false}
|
|
SMTP_USER: ${SMTP_USER:-}
|
|
SMTP_PASS: ${SMTP_PASS:-}
|
|
SMTP_FROM: ${SMTP_FROM:-noreply@tower.local}
|
|
ports:
|
|
- '127.0.0.1:3001:3001'
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
meilisearch:
|
|
condition: service_started
|
|
restart: unless-stopped
|
|
|
|
worker:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/worker/Dockerfile
|
|
environment:
|
|
NODE_ENV: production
|
|
DATABASE_URL: postgresql://tower:${DB_PASSWORD:-tower_dev}@postgres:5432/tower
|
|
REDIS_URL: redis://redis:6379
|
|
MEILI_URL: http://meilisearch:7700
|
|
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-tower_meili_dev_key}
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
LOG_LEVEL: ${LOG_LEVEL:-info}
|
|
WHATSAPP_SESSION_PATH: ${WHATSAPP_SESSION_PATH:-/app/sessions}
|
|
TOWER_PORTAL_BASE_URL: ${TOWER_PORTAL_BASE_URL}
|
|
SMTP_HOST: ${SMTP_HOST:-}
|
|
SMTP_PORT: ${SMTP_PORT:-587}
|
|
SMTP_SECURE: ${SMTP_SECURE:-false}
|
|
SMTP_USER: ${SMTP_USER:-}
|
|
SMTP_PASS: ${SMTP_PASS:-}
|
|
SMTP_FROM: ${SMTP_FROM:-noreply@tower.local}
|
|
volumes:
|
|
- sessions:/app/sessions
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
meilisearch:
|
|
condition: service_started
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
meilisearch_data:
|
|
sessions:
|