-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
60 lines (60 loc) · 1.78 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
version: "2"
services:
www:
build: .
image: popbox/app-service
ports:
- 8081-8090:80
volumes:
- ./www:/var/www/html/
links:
- db:db
networks:
- default
mem_limit: 536870912 #512 MB (Memory is measured in bytes and the minimum memory is 4 MB)
cpu_shares: 100 #indicates 1 core
#labels:
# - "traefik.frontend.rule=Host:localhost"
lb:
image: dockercloud/haproxy
ports:
- 80:80
- 1936:1936 # statistic dashboard localhost:1936, remove this on production (user=stats / pwd=stats)
links:
- www
volumes:
- /var/run/docker.sock:/var/run/docker.sock
#reverse-proxy:
# image: traefik # The official Traefik docker image
# command: --api --docker # Enables the web UI and tells Træfik to listen to docker
# ports:
# - "80:80" # The HTTP port
# - "8080:8080" # The Web UI (enabled by --api)
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
db:
image: mysql:5.7
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: dbapp
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
volumes:
- ./db:/docker-entrypoint-initdb.d
- persistent:/var/lib/mysql
networks:
- default
phpmyadmin:
image: phpmyadmin/phpmyadmin
links:
- db:db
ports:
- 9090:80
environment:
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
volumes:
persistent: