121 lines
3.0 KiB
YAML
121 lines
3.0 KiB
YAML
name: adc-retivo-dev
|
|
|
|
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}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata_dev:/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"]
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redisdata_dev:/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:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
volumes:
|
|
- miniodata_dev:/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -sf http://localhost:9000/minio/health/live || exit 1"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 30
|
|
networks: [adc]
|
|
|
|
server:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/server/Dockerfile.dev
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.dev
|
|
ports:
|
|
- "3001:3001"
|
|
volumes:
|
|
- ./apps/server/src:/app/apps/server/src
|
|
- ./apps/server/drizzle:/app/apps/server/drizzle
|
|
- ./apps/server/drizzle.config.ts:/app/apps/server/drizzle.config.ts
|
|
- /app/node_modules
|
|
- /app/apps/server/node_modules
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
command:
|
|
[
|
|
"sh",
|
|
"-c",
|
|
"npm run db:migrate -w @adc-retivo/server && npm run db:seed -w @adc-retivo/server && npm run dev -w @adc-retivo/server",
|
|
]
|
|
networks: [adc]
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/web/Dockerfile.dev
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.dev
|
|
ports:
|
|
- "5173:5173"
|
|
volumes:
|
|
- ./apps/web/src:/app/apps/web/src
|
|
- ./apps/web/index.html:/app/apps/web/index.html
|
|
- ./apps/web/vite.config.ts:/app/apps/web/vite.config.ts
|
|
- ./apps/web/tailwind.config.js:/app/apps/web/tailwind.config.js
|
|
- ./apps/web/postcss.config.js:/app/apps/web/postcss.config.js
|
|
- /app/node_modules
|
|
- /app/apps/web/node_modules
|
|
depends_on:
|
|
- server
|
|
networks: [adc]
|
|
|
|
volumes:
|
|
pgdata_dev:
|
|
redisdata_dev:
|
|
miniodata_dev:
|
|
|
|
networks:
|
|
adc:
|
|
driver: bridge
|