This repository has been archived by the owner on Feb 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
75 lines (69 loc) · 1.57 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
64
65
66
67
68
69
70
71
72
73
74
75
version: "3.6"
services:
app:
image: zaherg/laravel-starter
build:
context: ./
dockerfile: Dockerfile
networks:
- backend
volumes:
- ./:/var/www
labels:
- "traefik.backend=web"
- "traefik.frontend.rule=Host:web.docker.local"
- "traefik.enable=true"
- "traefik.port=80"
- "traefik.backend.loadbalancer.method=drr"
healthcheck:
disable: true
env_file:
- .env
restart: unless-stopped
database:
image: mysql:5.7
hostname: database
ports:
- "3306:3306"
environment:
- "MYSQL_RANDOM_ROOT_PASSWORD=yes"
- "MYSQL_DATABASE=docker"
- "MYSQL_USER=docker"
- "MYSQL_PASSWORD=secret"
networks:
- backend
volumes:
- mysql:/var/lib/mysql
labels:
- "traefik.backend=database"
- "traefik.enable=false"
restart: unless-stopped
proxy:
image: traefik:latest
command:
- --web
- --web.statistics
- --docker
- "--docker.domain=docker.local"
- "--docker.swarmMode=false"
- "--logLevel=DEBUG"
- --defaultentrypoints=gamester
- "--entryPoints=Name:gamester Address::80 Compress:true"
networks:
- backend
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
labels:
- "traefik.backend=proxy"
- "traefik.frontend.rule=Host:proxy.docker.local"
- "traefik.enable=true"
- "traefik.port=8080"
restart: unless-stopped
networks:
backend:
volumes:
mysql: