Files
thoughts/compose.yml
Gabriel Kaszewski b2d6be90c2
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Has been cancelled
test / unit (pull_request) Has been cancelled
test / integration (pull_request) Has been cancelled
chore: update README, Dockerfile, compose.yml — add frontend/worker services, SSR env var, feature list
2026-05-15 01:26:23 +02:00

68 lines
1.5 KiB
YAML

services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: thoughts
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
nats:
image: nats:2-alpine
ports:
- "4222:4222"
- "8222:8222" # monitoring endpoint
command: ["--jetstream", "--http_port", "8222"]
api:
build: .
ports:
- "8000:8000"
environment:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/thoughts
JWT_SECRET: change-me-in-production
BASE_URL: http://localhost:8000
NATS_URL: nats://nats:4222
RUST_LOG: info
depends_on:
postgres:
condition: service_healthy
nats:
condition: service_started
worker:
build: .
entrypoint: ["./thoughts-worker"]
environment:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/thoughts
BASE_URL: http://localhost:8000
NATS_URL: nats://nats:4222
RUST_LOG: info
depends_on:
postgres:
condition: service_healthy
nats:
condition: service_started
frontend:
build:
context: ./thoughts-frontend
args:
NEXT_PUBLIC_API_URL: http://localhost:8000
NEXT_PUBLIC_SERVER_SIDE_API_URL: http://api:8000
ports:
- "3000:3000"
depends_on:
- api
volumes:
postgres_data: