89 lines
2.0 KiB
YAML
89 lines
2.0 KiB
YAML
name: adc-retivo
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-adc}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-adc}
|
|
POSTGRES_DB: ${POSTGRES_DB:-adc}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"pg_isready -U ${POSTGRES_USER:-adc} -d ${POSTGRES_DB:-adc}",
|
|
]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
networks: [adc]
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
command: ["redis-server", "--appendonly", "yes"]
|
|
volumes:
|
|
- redisdata:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
networks: [adc]
|
|
|
|
minio:
|
|
image: ${MINIO_IMAGE:-minio/minio:latest}
|
|
restart: unless-stopped
|
|
# Leave MINIO_COMMAND empty for images with their own entrypoint/start script
|
|
# (e.g. firstfinger/minio). For stock minio/minio it defaults to the server command.
|
|
command: ${MINIO_COMMAND-server /data --console-address ":9001"}
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
|
|
ports:
|
|
- "9001:9001"
|
|
volumes:
|
|
- miniodata:/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -sf http://localhost:9000/minio/health/live || exit 1"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 30
|
|
networks: [adc]
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/server/Dockerfile
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "${PORT:-3000}:3000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
command:
|
|
[
|
|
"sh",
|
|
"-c",
|
|
"node dist/db/migrate.js && node dist/db/seed.js && node dist/index.js",
|
|
]
|
|
networks: [adc]
|
|
|
|
volumes:
|
|
pgdata:
|
|
redisdata:
|
|
miniodata:
|
|
|
|
networks:
|
|
adc:
|
|
driver: bridge
|