Co-authored-by: Neko Ayaka <neko@ayaka.moe> Co-authored-by: Lovehsigure_520 <1260907335@qq.com>
34 lines
656 B
YAML
34 lines
656 B
YAML
version: '3.9'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: airi-postgres
|
|
environment:
|
|
- POSTGRES_DB=airi
|
|
- POSTGRES_USER=airi
|
|
- POSTGRES_PASSWORD=airi
|
|
ports:
|
|
- '5432:5432'
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB']
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
volumes:
|
|
- ${serviceName}_data:/var/lib/postgresql/data
|
|
|
|
server:
|
|
build:
|
|
context: ../..
|
|
dockerfile: apps/server/Dockerfile
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ports:
|
|
- '3000:3000'
|
|
|
|
volumes:
|
|
db_data:
|
|
driver: local
|