初次提交
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
services:
|
||||
voicehub:
|
||||
build: .
|
||||
ports:
|
||||
- '4456:3000'
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://user:password@postgres:5432/voicehub
|
||||
- JWT_SECRET=your-jwt-secret-here
|
||||
- NODE_ENV=production
|
||||
- NODE_OPTIONS=--max-old-space-size=512
|
||||
- SKIP_BUILD=true
|
||||
mem_limit: 1200m
|
||||
mem_reservation: 256m
|
||||
cpus: '1.0'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 1200M
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=user
|
||||
- POSTGRES_PASSWORD=password
|
||||
- POSTGRES_DB=voicehub
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- '5433:5432'
|
||||
mem_limit: 1200m
|
||||
mem_reservation: 256m
|
||||
cpus: '1.0'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 1200M
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'pg_isready -U user -d voicehub']
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user