- Update all package names from @glossa/* to @lila/* - Update all imports, container names, volume names - Update documentation references - Recreate database with new credentials
78 lines
1.8 KiB
YAML
78 lines
1.8 KiB
YAML
services:
|
|
database:
|
|
container_name: lila-database
|
|
image: postgres:18.3-alpine3.23
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- PGDATA=/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- lila-db:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
valkey:
|
|
container_name: lila-valkey
|
|
image: valkey/valkey:9.1-alpine3.23
|
|
ports:
|
|
- "6379:6379"
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "valkey-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
api:
|
|
container_name: lila-api
|
|
build:
|
|
context: .
|
|
dockerfile: ./apps/api/Dockerfile
|
|
target: dev
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./apps/api:/app/apps/api # Hot reload API code
|
|
- ./packages/shared:/app/packages/shared # Hot reload shared
|
|
- /app/node_modules
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test:
|
|
["CMD-SHELL", "wget -qO- http://localhost:3000/api/health || exit 1"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
valkey:
|
|
condition: service_healthy
|
|
|
|
web:
|
|
container_name: lila-web
|
|
build:
|
|
context: .
|
|
dockerfile: ./apps/web/Dockerfile
|
|
target: dev
|
|
ports:
|
|
- "5173:5173"
|
|
volumes:
|
|
- ./apps/web:/app/apps/web # Hot reload: local edits reflect immediately
|
|
- /app/node_modules # Protect container's node_modules from being overwritten
|
|
environment:
|
|
- VITE_API_URL=http://localhost:3000
|
|
restart: unless-stopped
|
|
depends_on:
|
|
api:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
lila-db:
|