auth/docker-compose.yml

78 lines
1.4 KiB
YAML

version: '3.8'
services:
api:
container_name: v3-auth
build:
dockerfile: Dockerfile
context: .
target: development
volumes:
- .:/usr/src/app
env_file:
- .env
command: npm run start:dev
ports:
- ${SERVICE_PORT:-5002}:${SERVICE_PORT:-5002}
depends_on:
- db
networks:
v3-network:
aliases:
- v3-auth-api
db:
container_name: v3-auth-db
image: ${POSTGRES_IMAGE}
environment:
POSTGRES_DB: auth
POSTGRES_USER: auth
POSTGRES_PASSWORD: auth
ports:
- 5502:5432
volumes:
- .postgresql:/var/lib/postgresql/data:rw
networks:
v3-network:
aliases:
- v3-auth-db
db-test:
container_name: v3-auth-db-test
image: ${POSTGRES_IMAGE}
environment:
POSTGRES_DB: auth
POSTGRES_USER: auth
POSTGRES_PASSWORD: auth
ports:
- 5602:5432
networks:
v3-network:
aliases:
- v3-auth-db-test
opa:
container_name: v3-opa
image: ${OPA_IMAGE}
ports:
- 8181:8181
command:
- "run"
- "--server"
- "--log-format=json-pretty"
- "--set=decision_logs.console=true"
- "--set=default_decision=example/allow"
- "./policies/"
volumes:
- ./opa:/policies
networks:
v3-network:
aliases:
- v3-opa
networks:
v3-network:
name: v3-network
external: true