-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
61 lines (54 loc) · 1.06 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
version: '3'
services:
db:
image: mariadb:10.0
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_DATABASE=spark
- MYSQL_USER=spark
- MYSQL_PASSWORD=spark
volumes:
- "mysql:/var/lib/mysql"
ports:
- "3306:3306"
camps_index:
depends_on:
- db
build: .
image: midburn-camps-index
environment:
- LOOP_INTERVAL_SECONDS=5
- MYSQL_HOST=db
- MYSQL_USER=spark
- MYSQL_PASS=123456
- MYSQL_PORT=3306
- MYSQL_DB=spark
volumes:
- nginx_html:/usr/share/nginx/html
nginx:
ports:
- "8080:80"
depends_on:
- camps_index
image: nginx
entrypoint:
- bash
- "-c"
- |
echo "
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html/public;
index index.html;
}
error_page 404 /404.html;
}
" > /etc/nginx/conf.d/default.conf
nginx -g "daemon off;"
volumes:
- nginx_html:/usr/share/nginx/html
volumes:
mysql:
nginx_html: