YAS/docker-compose.yml
YetAnotherSuite Dev 382ba97c84 fix: add package.json to API runner stage for ESM detection; move web port to 3001
- API Dockerfile: copy API's package.json (with 'type': 'module')
  into runner so Node.js treats .js files as ESM
- docker-compose: change web host port from 3000 to 3001 to
  avoid conflict with local dev server
2026-07-20 23:27:49 +02:00

63 lines
1.3 KiB
YAML

services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: yetanother
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
meilisearch:
image: getmeili/meilisearch:v1.12
environment:
MEILI_MASTER_KEY: dev-master-key
volumes:
- meilisearch_data:/meili_data
api:
build:
context: .
dockerfile: apps/api/Dockerfile
ports:
- "4000:4000"
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/yetanother?schema=public
REDIS_URL: redis://redis:6379
JWT_SECRET: dev-jwt-secret
NODE_ENV: production
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
web:
build:
context: .
dockerfile: apps/web/Dockerfile
ports:
- "3001:80"
depends_on:
- api
volumes:
postgres_data:
redis_data:
meilisearch_data: