-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
67 lines (63 loc) · 1.53 KB
/
docker-compose.dev.yaml
File metadata and controls
67 lines (63 loc) · 1.53 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
services:
redis:
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5
image: redis:8.4-rc1-alpine3.22
ports:
- "6379:6379"
container_name: redis
volumes:
- redis_data:/data
postgres:
image: postgres:18-alpine
container_name: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: auth_db
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER}" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./init/init-postgresql.sql:/docker-entrypoint-initdb.d/init-postgresql.sql
- postgres_data:/var/lib/postgresql/data
command: [ "postgres" ]
auth-service:
build:
context: ./auth-service
args:
GRADLE_USER_HOME: /root/.gradle-auth
image: auth-service
ports:
- "8081:8081"
environment:
- PORT=8001
- REDIS_HOST=redis
- REDIS_PORT=6379
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=authdb
- POSTGRES_USER=${AUTH_POSTGRES_USER_USERNAME}
- POSTGRES_PASSWORD=${AUTH_POSTGRES_USER_PASSWORD}
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
container_name: auth-service
volumes:
- ~/.keys/jwt/:/etc/keys/
volumes:
redis_data:
driver: local
name: redis_data
postgres_data:
driver: local
name: postgres_data