a new start
This commit is contained in:
49
core/compose.yaml
Normal file
49
core/compose.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
services:
|
||||
# PostgreSQL - Central Database
|
||||
postgres:
|
||||
image: ${CORE_POSTGRES_IMAGE:-postgres:16-alpine}
|
||||
container_name: ${CORE_COMPOSE_PROJECT_NAME}_postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: ${TIMEZONE:-Europe/Amsterdam}
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
# Performance tuning
|
||||
POSTGRES_MAX_CONNECTIONS: ${CORE_POSTGRES_MAX_CONNECTIONS:-100}
|
||||
POSTGRES_SHARED_BUFFERS: ${CORE_POSTGRES_SHARED_BUFFERS:-256MB}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./postgres/init:/docker-entrypoint-initdb.d:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
networks:
|
||||
- compose_network
|
||||
|
||||
redis:
|
||||
image: ${CORE_REDIS_IMAGE:-redis:7-alpine}
|
||||
container_name: ${CORE_COMPOSE_PROJECT_NAME}_redis
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: ${TIMEZONE:-Europe/Amsterdam}
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
|
||||
networks:
|
||||
- compose_network
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
name: ${CORE_COMPOSE_PROJECT_NAME}_postgres_data
|
||||
redis_data:
|
||||
name: ${CORE_COMPOSE_PROJECT_NAME}_redis_data
|
||||
Reference in New Issue
Block a user