-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
151 lines (149 loc) · 3.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
version: "3.9"
services:
database:
image: postgres:15
container_name: database
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
hostname: database
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
ports:
- "5432:5432"
restart: unless-stopped
user: postgres
volumes:
- "./data:/var/lib/postgresql"
networks:
- default
database-migrations:
image: flyway/flyway:10-alpine
container_name: backend-migrations
command:
- info
- migrate
- info
volumes:
- "./backend/db/migrations:/flyway/sql"
environment:
- FLYWAY_URL=jdbc:postgresql://database:5432/postgres
- FLYWAY_USER=postgres
- FLYWAY_PASSWORD=postgres
- FLYWAY_BASELINE_ON_MIGRATE=true
- FLYWAY_DEFAULT_SCHEMA=pay_transparency
depends_on:
database:
condition: service_healthy
networks:
- default
backend:
image: backend:latest
build:
context: backend
dockerfile: Dockerfile
env_file:
- ./backend/.env
environment:
NODE_ENV: development
POSTGRESQL_HOST: database
PORT: "3000"
DOC_GEN_SERVICE_URL: http://doc-gen-service:3000
hostname: backend
links:
- database
ports:
- "3000:3000"
user: root
depends_on:
database:
condition: service_healthy
database-migrations:
condition: service_started
networks:
- default
doc-gen-service:
image: doc-gen-service:latest
build:
context: doc-gen-service
dockerfile: Dockerfile
environment:
NODE_ENV: development
PORT: "3000"
hostname: doc-gen-service
ports:
- "3001:3000"
user: "1001"
depends_on:
backend:
condition: service_started
networks:
- default
backend-external:
image: backend-external:latest
build:
context: backend-external
dockerfile: Dockerfile
environment:
NODE_ENV: development
PORT: "3000"
hostname: backend-external
ports:
- "3002:3000"
user: "1001"
depends_on:
backend:
condition: service_started
networks:
- default
frontend:
container_name: frontend
build:
context: frontend
dockerfile: Dockerfile
environment:
NODE_ENV: development
BACKEND_URL: backend
hostname: frontend
links:
- backend
ports:
- "3000:3000"
volumes:
- ./frontend:/app:z
- /app/node_modules
user: root
working_dir: "/app"
depends_on:
backend:
condition: service_healthy
networks:
- default
admin-frontend:
container_name: admin-frontend
build:
context: admin-frontend
dockerfile: Dockerfile
environment:
NODE_ENV: development
BACKEND_URL: backend
hostname: admin-frontend
links:
- backend
ports:
- "3000:3000"
volumes:
- ./frontend:/app:z
- /app/node_modules
user: root
working_dir: "/app"
depends_on:
backend:
condition: service_healthy
networks:
- default
networks:
default:
driver: bridge