chore: move docker-compose.yml

This commit is contained in:
g0ldyy
2025-12-26 00:31:08 +01:00
parent 24fb50bf77
commit 84b94ff988
2 changed files with 52 additions and 69 deletions
+52 -6
View File
@@ -5,13 +5,59 @@ services:
restart: unless-stopped
ports:
- "8000:8000"
environment:
DATABASE_TYPE: ${DATABASE_TYPE:-postgresql}
DATABASE_URL: ${DATABASE_URL:-comet:comet@postgres:5432/comet}
env_file:
- .env
volumes:
- ./data/comet:/app/data
- comet_data:/data
healthcheck:
test: wget -qO- http://127.0.0.1:8000/health
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8000/health"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
depends_on:
postgres:
condition: service_healthy
postgres:
container_name: comet-postgres
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_USER: comet
POSTGRES_PASSWORD: comet
POSTGRES_DB: comet
command:
- "postgres"
- "-c"
- "shared_buffers=128MB"
- "-c"
- "effective_cache_size=384MB"
- "-c"
- "maintenance_work_mem=64MB"
- "-c"
- "checkpoint_completion_target=0.9"
- "-c"
- "wal_buffers=8MB"
- "-c"
- "random_page_cost=1.1"
- "-c"
- "effective_io_concurrency=200"
- "-c"
- "work_mem=8MB"
- "-c"
- "max_connections=100"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U comet -d comet"]
interval: 5s
timeout: 5s
retries: 5
volumes:
comet_data:
postgres_data:
-63
View File
@@ -1,63 +0,0 @@
services:
comet:
container_name: comet
image: g0ldyy/comet
restart: unless-stopped
ports:
- "8000:8000"
environment:
DATABASE_TYPE: ${DATABASE_TYPE:-postgresql}
DATABASE_URL: ${DATABASE_URL:-comet:comet@postgres:5432/comet}
env_file:
- .env
volumes:
- comet_data:/data
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8000/health"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
depends_on:
postgres:
condition: service_healthy
postgres:
container_name: comet-postgres
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_USER: comet
POSTGRES_PASSWORD: comet
POSTGRES_DB: comet
command:
- "postgres"
- "-c"
- "shared_buffers=128MB"
- "-c"
- "effective_cache_size=384MB"
- "-c"
- "maintenance_work_mem=64MB"
- "-c"
- "checkpoint_completion_target=0.9"
- "-c"
- "wal_buffers=8MB"
- "-c"
- "random_page_cost=1.1"
- "-c"
- "effective_io_concurrency=200"
- "-c"
- "work_mem=8MB"
- "-c"
- "max_connections=100"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U comet -d comet"]
interval: 5s
timeout: 5s
retries: 5
volumes:
comet_data:
postgres_data: