-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (51 loc) · 1.2 KB
/
docker-compose.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: '3.9'
services:
postgres:
image: postgres:15.2-alpine3.17
user: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=prutt
- POSTGRES_DB=auth
# ports:
# - 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 3s
timeout: 10s
retries: 5
start_period: 80s
db-migrations:
build:
context: .
dockerfile: Dockerfile.migrations
environment:
- DATABASE_URL=postgres://postgres:prutt@postgres:5432/auth?sslmode=disable
command: ["--wait", "up"]
depends_on:
postgres:
condition: service_started
api:
build: .
environment:
- ADMIN_API_KEY=hihi
- DATABASE_URL=postgres://postgres:prutt@postgres:5432/auth?sslmode=disable
- JWT_SHARED_SECRET=hihi
- WEB_BIND_HOST=:4000
- LOG_MIN_LVL=Debug
depends_on:
db-migrations:
condition: service_completed_successfully
ports:
- 4000:4000
tests:
build:
context: tests
environment:
- ADMIN_API_KEY=hihi
- AUTH_URL=http://api:4000
- JWT_SHARED_SECRET=hihi
profiles: ["tests"]
depends_on:
api:
condition: service_started