-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
98 lines (93 loc) · 2.16 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
services:
auth:
build:
dockerfile: auth.Dockerfile
context: .
target: ${NODE_ENV}
container_name: json-to-yaml-auth
environment:
AUTH_PORT: ${AUTH_PORT}
LOG_LEVEL: ${LOG_LEVEL}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
GITHUB_REDIRECT_URI: ${GITHUB_REDIRECT_URI}
REDIS_ADDR: ${REDIS_ADDR}
env_file:
- ./.env
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
ports:
- 8000:8000
networks:
- json-to-yaml-network
volumes:
- .:/node/app
converter:
build:
dockerfile: converter.Dockerfile
context: .
target: ${NODE_ENV}
container_name: json-to-yaml-converter
environment:
CONVERTER_PORT: ${CONVERTER_PORT}
LOG_LEVEL: ${LOG_LEVEL}
env_file:
- ./.env
depends_on:
- auth
networks:
- json-to-yaml-network
volumes:
- .:/node/app
postgres:
image: postgres:bookworm
restart: always
container_name: json-to-yaml-db
env_file:
- ./.env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test: [CMD-SHELL, "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"]
interval: 10s
timeout: 5s
retries: 5
ports:
- 5432:5432
volumes:
- pg-data:/var/lib/postgresql/data
networks:
- json-to-yaml-network
redis:
image: redis:bookworm
container_name: json-to-yaml-redis
restart: always
healthcheck:
test: [CMD, redis-cli, ping]
interval: 10s
timeout: 3s
retries: 5
ports:
- 6379:6379
environment:
- REDIS_DATABASE=0
volumes:
- redis:/var/lib/redis
- redis-config:/usr/local/etc/redis/redis.conf
networks:
- json-to-yaml-network
volumes:
pg-data:
redis:
redis-config:
networks:
json-to-yaml-network: