2021-06-22 22:52:48 +02:00
|
|
|
version: '3.9'
|
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgres:13.3-alpine
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=postgres
|
|
|
|
- POSTGRES_PASSWORD=postgres
|
|
|
|
- POSTGRES_DB=auth
|
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
|
|
|
|
db-migrations:
|
|
|
|
image: amacneil/dbmate:v1.12.0
|
|
|
|
environment:
|
|
|
|
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/auth?sslmode=disable
|
|
|
|
volumes:
|
|
|
|
- "./db:/db:ro"
|
2021-06-23 22:30:45 +02:00
|
|
|
command: --wait up
|
2021-06-22 22:52:48 +02:00
|
|
|
profiles: ["migrations"]
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
|
|
|
|
auth:
|
|
|
|
build: .
|
|
|
|
environment:
|
|
|
|
- ADMIN_API_KEY=hihi
|
|
|
|
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/auth?sslmode=disable
|
|
|
|
- JWT_SHARED_SECRET=hihi
|
|
|
|
- WEB_BIND_HOST=:4000
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
ports:
|
2021-06-23 22:59:27 +02:00
|
|
|
- 4000:4000
|
|
|
|
|
|
|
|
tests:
|
|
|
|
build:
|
|
|
|
context: tests
|
|
|
|
environment:
|
|
|
|
- ADMIN_API_KEY=hihi
|
|
|
|
- AUTH_URL=http://auth:4000
|
|
|
|
- JWT_SHARED_SECRET=hihi
|
|
|
|
profiles: ["tests"]
|
|
|
|
depends_on:
|
|
|
|
- auth
|