-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
63 lines (57 loc) · 1.24 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
version: '3.8'
x-app-common:
&app-common
image: ${APP_IMAGE_NAME:-git-watchdog:local}
build:
context: .
dockerfile: Dockerfile
environment:
&app-common-env
LOG_MODE: production
LOG_LEVEL: INFO
GIN_MODE: release
DB_NAME: code-challenge
DB_USER: dev
DB_PASSWORD: dev
DB_ADDRESS: mydb:3306
AMQP_SERVER_URL: amqp://guest:guest@rabbitmq:5672/
services:
mydb:
image: mysql:8.0.25
command: mysqld --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: code-challenge
MYSQL_USER: dev
MYSQL_PASSWORD: dev
ports:
- '3306:3306'
volumes:
- dbstorage:/var/lib/mysql
rabbitmq:
image: rabbitmq:3-management-alpine
ports:
- '5672:5672'
- '15672:15672'
app:
<<: *app-common
restart: always
depends_on:
- mydb
ports:
- "8080:8080"
scan-consumer:
<<: *app-common
restart: always
entrypoint: ./scanworker
depends_on:
- mydb
app-migration:
<<: *app-common
restart: on-failure
entrypoint: ./migrate
depends_on:
- app
volumes:
dbstorage:
rabbitmq_data: