chore: add .env.example and wire compose.yml to env vars
- .env.example documents all env vars with defaults (postgres creds, DATABASE_URL, TTLs, pool sizes) - compose.yml reads postgres credentials and app config from .env via env_file - .gitignore: track .env.example, ignore .env
This commit is contained in:
+6
-8
@@ -3,13 +3,13 @@ services:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: goyomi
|
||||
POSTGRES_USER: goyomi
|
||||
POSTGRES_PASSWORD: goyomi
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U goyomi -d goyomi"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
@@ -25,11 +25,9 @@ services:
|
||||
app:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
DATABASE_URL: postgres://goyomi:goyomi@postgres:5432/goyomi?sslmode=disable
|
||||
FLARESOLVERR_URL: http://flaresolverr:8191
|
||||
- "${ADDR:-8080}:8080"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in New Issue
Block a user