-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (32 loc) · 1.18 KB
/
docker-compose.yml
File metadata and controls
35 lines (32 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: '3.8'
services:
postgres_db:
image: postgres:15 # Or your preferred Postgres version
container_name: auth_postgres
environment:
POSTGRES_DB: auth_service_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres # Use secrets in production!
ports:
- "5432:5432" # Map host port 5432 to container port 5432
volumes:
- postgres_data:/var/lib/postgresql/data
auth-service:
build: . # Build the image from the Dockerfile in the current directory
# Or use a pre-built image:
# image: your-dockerhub-username/auth-service:latest
container_name: auth_service_app
depends_on:
- postgres_db
ports:
- "8081:8081" # Map host port 8081 to container port 8081
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres_db:5432/auth_service_db
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres # Use secrets in production!
# Add other environment variables needed by your app (Keycloak, OpenFGA URLs, etc.)
# KEYCLOAK_AUTH_SERVER_URL: http://keycloak:8080/auth
# OPENFGA_API_URL: http://openfga:8080
restart: unless-stopped
volumes:
postgres_data: