This repository has been archived by the owner on Aug 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
124 lines (112 loc) · 3.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
version: '3'
services:
traefik:
image: traefik:v2.2
container_name: u_traefik
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command:
- --log.level=INFO
- --metrics.prometheus=true
- --api.insecure=true
- --providers.docker=true
- --entrypoints.web.address=:80
ports:
- 80:80
- 8080:8080
server:
container_name: u_server
volumes:
- ./:${DOCKER_CONTAINER_PATH}
web:
container_name: u_web
labels:
- traefik.http.routers.web.rule=Host(`${DOCKER_DOMAIN}`)
- traefik.http.routers.web.entrypoints=web
websocket:
container_name: u_websocket
depends_on:
- rabbitmq
labels:
- traefik.http.routers.websocket.rule=Host(`${DOCKER_DOMAIN}`) && Path(`/ws/server/`)
- traefik.http.routers.websocket.entrypoints=web
php-worker:
build: .docker/php-worker
container_name: u_php_worker
restart: always
depends_on:
- server
volumes:
- ./:${DOCKER_CONTAINER_PATH}
- ./.docker/php-worker/supervisord.d:/etc/supervisord.d
nginx:
build: ./.docker/nginx
container_name: u_nginx
restart: always
volumes:
- ./:${DOCKER_CONTAINER_PATH}
- ./storage/app/public:${DOCKER_CONTAINER_PATH}/public/storage/
- ./.docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./.docker/nginx/sites/:/etc/nginx/sites-available
- ./.docker/nginx/conf.d/:/etc/nginx/conf.d
depends_on:
- server
labels:
- traefik.http.routers.nginx.rule=Host(`${DOCKER_DOMAIN}`) && PathPrefix(`/api/`, `/storage/`, `/robots.txt`)
- traefik.http.routers.nginx.entrypoints=web
mysql:
build: ./.docker/mysql
container_name: u_mysql
restart: always
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
volumes:
- ${DOCKER_DATA_PATH}/mysql:/var/lib/mysql
redis:
build: ./.docker/redis
container_name: u_redis
restart: always
volumes:
- ${DOCKER_DATA_PATH}/redis:/data
rabbitmq:
build: ./.docker/rabbitmq
container_name: u_rabbitmq
restart: always
volumes:
- ${DOCKER_DATA_PATH}/rabbitmq:/var/lib/rabbitmq
labels:
- traefik.http.routers.rabbitmq.rule=Host(`rabbitmq.localhost`)
- traefik.http.services.rabbitmq.loadbalancer.server.port=15672
prometheus:
image: prom/prometheus
container_name: u_prometheus
restart: always
user: "0"
labels:
- traefik.http.routers.prometheus.rule=Host(`prometheus.localhost`)
grafana:
image: grafana/grafana:7.0.5
container_name: u_grafana
restart: always
depends_on:
- prometheus
user: "0"
volumes:
- ${DOCKER_DATA_PATH}/grafana:/var/lib/grafana
labels:
- traefik.http.routers.grafana.rule=Host(`grafana.localhost`)
phpmyadmin:
image: phpmyadmin/phpmyadmin:5.0
container_name: u_phpmyadmin
restart: always
environment:
- PMA_HOST=mysql
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
labels:
- traefik.http.routers.phpmyadmin.rule=Host(`phpmyadmin.localhost`)