File size: 1,116 Bytes
8025bcd 7f8b7d7 585806a cc1702e 7f8b7d7 cc1702e 7f8b7d7 585806a 8025bcd 7f8b7d7 cc1702e 7f8b7d7 cc1702e 8025bcd cc1702e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | version: "3.8"
services:
nginx:
image: nginx:alpine
ports:
- "7860:7860"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- api
api:
image: atendare/evolution-api:latest
restart: always
environment:
- PORT=8080
- DATABASE_TYPE=postgres
- DATABASE_CONNECTION_URI=postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DATABASE}?sslmode=disable
- DOCKER_ENV=true
# Forzamos el inicio y las migraciones por si la imagen oficial viene dormida
command: ["/bin/sh", "-c", "npx prisma migrate deploy --schema ./prisma/postgresql-schema.prisma && npm run start:prod"]
expose:
- "8080"
depends_on:
db:
condition: service_healthy
db:
image: postgres:15-alpine
environment:
- POSTGRES_DB=${POSTGRES_DATABASE}
- POSTGRES_USER=${POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USERNAME} -d ${POSTGRES_DATABASE}"]
interval: 10s
timeout: 5s
retries: 5 |