-
Notifications
You must be signed in to change notification settings - Fork 30
/
docker-compose.yml
61 lines (51 loc) · 1.22 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
version: '2.1'
services:
nginx:
image: nginx:alpine
restart: unless-stopped
ports:
- "80:80"
networks:
- web-gateway
- service-network
volumes:
- ./site.conf:/etc/nginx/conf.d/default.conf
depends_on:
- baseapp
baseapp:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
networks:
- service-network
environment:
BASEAPP_RUN_LEVEL: prod
BASEAPP_DATABASE_DRIVER: mymysql
BASEAPP_DATABASE_IMPORT: github.com/ziutek/mymysql/mysql
BASEAPP_DATABASE_SPEC: tcp:mysqldb:3306*baseapp/dev/dev
depends_on:
mysqldb:
condition: service_healthy
mysqldb:
image: mariadb:10.1.22
restart: unless-stopped
networks:
- service-network
environment:
MYSQL_DATABASE: baseapp
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: dev
MYSQL_PASSWORD: dev
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 5s
retries: 10
volumes:
- mysql_data:/var/lib/mysql
networks:
web-gateway:
service-network:
internal: true
volumes:
mysql_data: