-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
83 lines (80 loc) · 1.8 KB
/
docker-compose.yaml
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
services:
log:
image: amir20/dozzle
init: true
network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
database:
image: mariadb
restart: unless-stopped
init: true
network_mode: host
volumes:
- ./bootstrap.sql:/docker-entrypoint-initdb.d/bootstrap.sql
environment:
MARIADB_ROOT_PASSWORD: task
MARIADB_USER: task
MARIADB_DATABASE: task
MARIADB_PASSWORD: task
healthcheck:
start_period: 30s
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 30s
timeout: 3s
retries: 3
develop:
watch:
- path: bootstrap.sql
action: restart
middleware:
image: exchange
environment:
- MARIADB_ROOT_PASSWORD
- MARIADB_DATABASE
- MARIADB_ADDRESS
- MARIADB_USER
- MARIADB_PASSWORD
- MIDDLEWARE_ADDRESS
build:
context: .
network: host
restart: unless-stopped
init: true
network_mode: host
healthcheck:
test: ["CMD", "curl", "-f", "127.0.0.1:7777"]
interval: 30s
timeout: 3s
retries: 3
depends_on:
database:
condition: service_healthy
develop:
watch:
- path: cmd/api/main.go, internal
action: rebuild
entrypoint: /usr/bin/api
cron:
image: exchange
environment:
- MARIADB_ROOT_PASSWORD
- MARIADB_DATABASE
- MARIADB_ADDRESS
- MARIADB_USER
- MARIADB_PASSWORD
- MIDDLEWARE_ADDRESS
build:
context: .
network: host
restart: unless-stopped
init: true
network_mode: host
depends_on:
database:
condition: service_healthy
develop:
watch:
- path: cmd/cron/main.go, internal
action: rebuild
entrypoint: /usr/bin/cron