-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
73 lines (71 loc) · 1.64 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
version: '3'
volumes:
mysql-volume:
services:
db:
container_name: db
platform: linux/x86_64
image: mysql
hostname: backend-service-db
build:
context: .
dockerfile: backend-service/cmd/server/storage/Dockerfile
ports:
- "3306:3306"
volumes:
- ./backend-service/cmd/server/storage/schema.sql:/docker-entrypoint-initdb.d/schema.sql
- mysql-volume:/var/lib/mysql
environment:
MYSQL_USER: admin
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: backend_service
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
healthcheck:
test: mysql -h backend-service-db -P 3306 --user=$$MYSQL_USER --password=$$MYSQL_PASSWORD -e 'SHOW DATABASES;'
start_period: 10s
interval: 2s
timeout: 5s
retries: 100
server:
build:
context: .
dockerfile: backend-service/Dockerfile
hostname: backend-service
depends_on:
db:
condition: service_healthy
ports:
- "9090:9090" # http
api:
build:
context: .
dockerfile: api-service/Dockerfile
hostname: api-service
depends_on:
- server
ports:
- "8333:8333" # http
healthcheck:
test: curl --fail http://api-service:8333/healthcheck || exit 1;
interval: 5s
timeout: 5s
retries: 10
adminer:
image: adminer
restart: always
ports:
- 8080:8080
web-client:
build:
context: ./web-client
target: runner
depends_on:
- api
volumes:
- ./web-client:/app
command: npm run dev-docker-compose
ports:
- "3000:3000"
environment:
NODE_ENV: development