v30.3
This commit is contained in:
+29
-2
@@ -4,12 +4,35 @@ version: '3.9'
|
||||
# Usage: docker compose -f docker-compose.base.yml up -d
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: nexuma-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: change-me
|
||||
POSTGRES_DB: nexuma
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- nexuma
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: nexuma-redis
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- nexuma
|
||||
|
||||
@@ -20,7 +43,7 @@ services:
|
||||
environment:
|
||||
PORT: 3000
|
||||
GRPC_PORT: 3002
|
||||
DB_HOST: your-postgres-host
|
||||
DB_HOST: postgres
|
||||
DB_PORT: 5432
|
||||
DB_USER: postgres
|
||||
DB_PASSWORD: change-me
|
||||
@@ -37,7 +60,10 @@ services:
|
||||
- "3000:3000"
|
||||
- "3002:3002"
|
||||
depends_on:
|
||||
- redis
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- nexuma
|
||||
healthcheck:
|
||||
@@ -62,6 +88,7 @@ services:
|
||||
- nexuma
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user