52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
container_name: gauth_postgres
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
|
|
POSTGRES_DB: ${DB_NAME:-gauth}
|
|
ports:
|
|
- "${DB_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: gauth_redis
|
|
restart: always
|
|
ports:
|
|
- "${REDIS_PORT:-6379}:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
command: redis-server --appendonly yes
|
|
|
|
app:
|
|
build: .
|
|
container_name: gauth_app
|
|
restart: always
|
|
ports:
|
|
- "${PORT:-8080}:8080"
|
|
environment:
|
|
- PORT=8080
|
|
- DB_URL=host=postgres user=${DB_USER:-postgres} password=${DB_PASSWORD:-postgres} dbname=${DB_NAME:-gauth} port=5432 sslmode=disable TimeZone=Europe/Istanbul
|
|
- REDIS_URL=redis://redis:6379/0
|
|
- JWT_SECRET=${JWT_SECRET}
|
|
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
|
|
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
|
|
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
|
|
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
|
|
- CLIENT_CALLBACK_URL=${CLIENT_CALLBACK_URL}
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
|
|
|