51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: ghj-db
|
|
environment:
|
|
POSTGRES_USER: user
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: gohorsejobs
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- ghj-db-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U user -d gohorsejobs"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: ghj-backend
|
|
ports:
|
|
- "8521:8521"
|
|
environment:
|
|
- DATABASE_URL=postgresql://user:password@db:5432/gohorsejobs?sslmode=disable
|
|
- JWT_SECRET=rede5-secret-key-at-least-32-chars-long
|
|
- PASSWORD_PEPPER=rede5-pepper
|
|
- COOKIE_SECRET=rede5-cookie-secret
|
|
- ENV=development
|
|
- BACKEND_PORT=8521
|
|
- CORS_ORIGINS=https://ghj.rede5.com.br,http://localhost:3000
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: ghj-frontend
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NEXT_PUBLIC_API_URL=https://api-ghj.rede5.com.br/api/v1
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
ghj-db-data:
|