Files
willhaben-tracker/docker-compose.yml
T

104 lines
3.0 KiB
YAML

version: "3.9"
services:
db:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-postgres}
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- ./data/db:/var/lib/postgresql/data
- ./supabase/pg_hba.conf:/etc/postgresql/pg_hba.conf:ro
- ./supabase/migrations/00-run-init.sh:/docker-entrypoint-initdb.d/00-run-init.sh:ro
- ./supabase/migrations/01-init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
- ./supabase/migrations/post-boot.sql:/docker-entrypoint-initdb.d/post-boot.sql:ro
command: >
postgres
-c hba_file=/etc/postgresql/pg_hba.conf
-c wal_level=logical
-c max_wal_senders=0
-c max_replication_slots=0
-c idle_in_transaction_session_timeout=1min
ports:
- "55632:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-postgres}"]
interval: 5s
timeout: 5s
retries: 10
rest:
image: postgrest/postgrest:v12.2.0
restart: unless-stopped
environment:
PGRST_DB_URI: postgres://authenticator@db:5432/${POSTGRES_DB:-postgres}
PGRST_DB_SCHEMAS: public
PGRST_DB_ANON_ROLE: authenticator
PGRST_JWT_SECRET: ${JWT_SECRET:-your-super-secret-jwt-key-change-in-production}
PGRST_DB_EXTRA_SEARCH_PATH: public
depends_on:
db:
condition: service_healthy
kong:
image: kong:2.8.1
restart: unless-stopped
environment:
KONG_DATABASE: "off"
KONG_DECLARATIVE_CONFIG: /etc/kong/kong.yml
KONG_PLUGINS: request-transformer,cors
KONG_PROXY_LISTEN: "0.0.0.0:8000"
KONG_NGINX_WORKER_PROCESSES: 1
volumes:
- ./supabase/kong.yml:/etc/kong/kong.yml:ro
ports:
- "55621:8000"
depends_on:
rest:
condition: service_started
studio:
image: supabase/studio
restart: unless-stopped
environment:
STUDIO_PG_META_URL: http://meta:8080
DEFAULT_ORGANIZATION_NAME: Local
DEFAULT_PROJECT_NAME: willhaben-tracker
ports:
- "55630:3000"
depends_on:
meta:
condition: service_started
meta:
image: supabase/postgres-meta:v0.84.2
restart: unless-stopped
environment:
PG_META_PORT: 8080
PG_META_DB_HOST: db
PG_META_DB_PORT: 5432
PG_META_DB_NAME: ${POSTGRES_DB:-postgres}
PG_META_DB_USER: ${POSTGRES_USER:-postgres}
PG_META_DB_PASSWORD: ${POSTGRES_PASSWORD}
depends_on:
db:
condition: service_healthy
worker:
build: ./worker
restart: unless-stopped
environment:
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
POSTGRES_HOST: db
POSTGRES_PORT: "5432"
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-postgres}
DEFAULT_INTERVAL_MINUTES: ${DEFAULT_INTERVAL_MINUTES:-60}
depends_on:
db:
condition: service_healthy