49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: aethex-auth-db
|
|
environment:
|
|
POSTGRES_USER: aethex
|
|
POSTGRES_PASSWORD: dev_password_change_in_prod
|
|
POSTGRES_DB: aethex_auth
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U aethex"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
auth-service:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: aethex-auth-service
|
|
environment:
|
|
NODE_ENV: development
|
|
PORT: 3000
|
|
DATABASE_URL: postgresql://aethex:dev_password_change_in_prod@postgres:5432/aethex_auth
|
|
JWT_SECRET: dev_secret_change_in_prod_make_it_long_and_random
|
|
JWT_EXPIRES_IN: 7d
|
|
REFRESH_TOKEN_SECRET: dev_refresh_secret_change_in_prod
|
|
GOOGLE_CLIENT_ID: your_google_client_id
|
|
GOOGLE_CLIENT_SECRET: your_google_client_secret
|
|
GITHUB_CLIENT_ID: your_github_client_id
|
|
GITHUB_CLIENT_SECRET: your_github_client_secret
|
|
FRONTEND_URL: http://localhost:9002
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./src:/app/src
|
|
- ./prisma:/app/prisma
|
|
command: npm run dev
|
|
|
|
volumes:
|
|
postgres_data:
|