-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
131 lines (125 loc) · 3.43 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
125
126
127
128
129
130
131
version: "3.8"
services:
webserver:
image: traefik:v2.5
restart: unless-stopped
command:
- --experimental.http3=true
- --log.level=DEBUG
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- ${WEB_PORT:-80}:80
links:
- php
- grafana
profiles:
- full
php:
build:
dockerfile: .docker/php/Dockerfile
context: ./
command:
- vendor/bin/wait-for-it.sh
- amqp:5672
- --strict
- --
- vendor/bin/wait-for-it.sh
- db:3306
- --strict
user: "${USER_ID:-1000}:${GROUP_ID:-1000}"
restart: unless-stopped
volumes:
- ./.docker/php/php.ini:/usr/local/etc/php/conf.d/40-custom.ini:ro
- ./.docker/data/composer:/home/appuser/.composer
- ./project:/var/www
environment:
TZ: Europe/Moscow
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
DB_LOGIN: ${DB_LOGIN}
GITHUB_TOKEN: ${GITHUB_TOKEN}
PHP_IDE_CONFIG: ${PHP_IDE_CONFIG:-}
YII_DEBUG: 'true'
YII_ENV: ${YII_ENV:-dev}
XDEBUG_MODE: ${XDEBUG_MODE:-off}
XDEBUG_CONFIG: "client_host=host.docker.internal"
XDEBUG_TRIGGER: "yes"
URL_PREFIX: /app
env_file:
- .env
extra_hosts:
- host.docker.internal:${HOST_IP:-host.docker.internal}
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(\"${DOMAIN}\") && Path(`/app`, `/app/{path:.*}`)"
- "traefik.http.routers.app.entrypoints=web"
profiles:
- full
- console-tools
dns: 1.1.1.1
db:
image: mysql:5.7
restart: unless-stopped
volumes:
- .docker/data/db:/var/lib/mysql
ports:
- ${DB_PORT:-3306}:3306
environment:
TZ: Europe/Moscow
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_LOGIN}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
profiles:
- full
amqp:
image: rabbitmq:3-management
restart: unless-stopped
environment:
RABBITMQ_DEFAULT_USER: ${AMQP_USER}
RABBITMQ_DEFAULT_PASS: ${AMQP_PASSWORD}
expose:
- 5672
ports:
- ${AMQP_PORT:-15672}:15672
profiles:
- full
loki:
image: grafana/loki:2.4.1
command: -config.file=/etc/loki/local-config.yaml
profiles:
- full
promtail:
image: grafana/promtail:2.4.1
volumes:
- ./project/runtime/logs:/var/log/app
- ./project/runtime/logs-rr:/var/log/rr
- .docker/data/promtail-data:/var/lib/promtail/positions
- .docker/loki/promtail-local-config.yml:/etc/promtail/config.yml
command: -config.file=/etc/promtail/config.yml
links:
- loki
profiles:
- full
grafana:
image: grafana/grafana-oss:latest
user: 1000:1000
volumes:
- .docker/data/grafana:/var/lib/grafana
- .docker/grafana/provisioning:/etc/grafana/provisioning
environment:
GF_SECURITY_ADMIN_USER: ${GRAFANA_USER:-yii-inform}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD}
GF_SERVER_ROOT_URL: http://${DOMAIN}/grafana
GF_SERVER_SERVE_FROM_SUB_PATH: "true"
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(\"${DOMAIN}\") && Path(`/grafana`, `/grafana/{path:.*}`)"
- "traefik.http.routers.grafana.entrypoints=web"
profiles:
- full