-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
121 lines (111 loc) · 2.61 KB
/
docker-compose.yml
File metadata and controls
121 lines (111 loc) · 2.61 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
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
version: '3.8'
services:
app:
# build:
# context: .
image: ghcr.io/chatgut/urlshortenerservice2:main
container_name: URLShortenerService2
depends_on:
mysql:
condition: service_healthy
environment:
DB_URL: jdbc:mysql://mysql:3306/demo
DB_USER: developer
DB_PASS: password
ports:
- "8004:8004"
mysql:
image: 'mysql:latest'
container_name: mysqlDb
volumes:
- db:/var/lib/mysql
environment:
MYSQL_DATABASE: demo
MYSQL_USER: developer
MYSQL_PASSWORD: password
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: root
ports:
- '3306:3306'
healthcheck:
test: [ "CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER -p$$MYSQL_PASSWORD" ]
interval: 30s
timeout: 10s
retries: 5
authservice:
image: ghcr.io/chatgut/authservice2:latest
container_name: auth
depends_on:
- auth-DB
environment:
DB_URL: auth-DB:3306/auth-DB1
DB_USER: developer
DB_PASS: password
ports:
- "8003:8080"
auth-DB:
image: 'mysql:latest'
container_name: auth-DB1
volumes:
- dbAuth:/var/lib/mysql
environment:
MYSQL_DATABASE: auth-DB1
MYSQL_USER: developer
MYSQL_PASSWORD: password
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: password
porthservice:
image: ghcr.io/chatgut/micropostservice:main
container_name: postService
restart: on-failure
depends_on:
- mongodb
- rabbitMQ
environment:
ROCKET_DATABASES: '{postservice={url="mongodb://dbMongoDB:27017"}}'
ROCKET_RABBIT_HOST: "amqp://QueueRabbitMQ:5672"
ports:
- "8000:8000"
mongodb:
image: 'mongo:latest'
container_name: dbMongoDB
volumes:
- dbData:/var/lib/mongodb
ports:
- "27017:27017"
rabbitMQ:
image: 'rabbitmq:3-management'
container_name: QueueRabbitMQ
volumes:
- dbData:/var/lib/rabbitmq
ports:
- "15672:15672"
- "5672:5672"
###
userservice:
image: ghcr.io/chatgut/userservice:1.0
ports:
- "8002:8002"
environment:
DB_URL: jdbc:mysql://userservice-mysql:3306/userservice-mysql
DB_USER: developer
DB_PASSWORD: password
userservice-mysql:
image: "mysql:latest"
container_name: userservice-mysql
volumes:
- db_mysql:/var/lib/mysql
environment:
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: userservice-mysql
MYSQL_USER: developer
MYSQL_PASSWORD: password
MYSQL_HOST: '%'
ports:
- "3309:3306"
volumes:
db:
dbAuth:
dbData:
db_mysql: