mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-11 17:28:05 +02:00
52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
- PORT=8080
|
|
- DATABASE_URL=postgres://flowreader:flowreader@db:5432/flowreader?sslmode=disable
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: [ "CMD", "wget", "-q", "--spider", "http://localhost:8080/health" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 64M
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
- POSTGRES_USER=flowreader
|
|
- POSTGRES_PASSWORD=flowreader
|
|
- POSTGRES_DB=flowreader
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready -U flowreader -d flowreader" ]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
# RAM Optimization (from Architecture NFR1)
|
|
command: >
|
|
postgres -c shared_buffers=24MB -c max_connections=20 -c work_mem=2MB
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 80M
|
|
|
|
volumes:
|
|
postgres_data:
|