v30.3
This commit is contained in:
@@ -41,12 +41,35 @@ Create a `docker-compose.yml` from the base example:
|
||||
version: '3.9'
|
||||
|
||||
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
|
||||
|
||||
@@ -57,7 +80,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
|
||||
@@ -73,7 +96,10 @@ services:
|
||||
- "3000:3000"
|
||||
- "3002:3002"
|
||||
depends_on:
|
||||
- redis
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- nexuma
|
||||
|
||||
@@ -92,6 +118,7 @@ services:
|
||||
- nexuma
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user