-
Notifications
You must be signed in to change notification settings - Fork 50
/
docker-compose.yml
65 lines (57 loc) · 1.61 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
version: '3.7'
services:
traefik:
image: traefik:1.7
command: --docker --docker.exposedbydefault=false
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
app:
image: thecodingmachine/php:7.3-v2-apache-node10
labels:
- traefik.enable=true
- traefik.backend=app
- traefik.frontend.rule=Host:app.localhost
environment:
APACHE_DOCUMENT_ROOT: "public/"
PHP_EXTENSION_XDEBUG: "1"
PHP_INI_MEMORY_LIMIT: "1G"
# Symfony
APP_ENV: "dev"
APP_SECRET: "8d2a5c935d8ef1c0e2b751147382bc75"
DATABASE_URL: "mysql://$MYSQL_USER:$MYSQL_PASSWORD@mysql:3306/$MYSQL_DATABASE"
volumes:
- ./sources/app:/var/www/html:rw
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: "$MYSQL_ROOT_PASSWORD"
MYSQL_DATABASE: "$MYSQL_DATABASE"
MYSQL_USER: "$MYSQL_USER"
MYSQL_PASSWORD: "$MYSQL_PASSWORD"
volumes:
- mysql_data:/var/lib/mysql
- ./services/mysql/utf8mb4.cnf:/etc/mysql/conf.d/utf8mb4.cnf:ro
mysql_tests:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: "admin"
MYSQL_DATABASE: "tests"
MYSQL_USER: "foo"
MYSQL_PASSWORD: "bar"
volumes:
- ./services/mysql/utf8mb4.cnf:/etc/mysql/conf.d/utf8mb4.cnf:ro
phpmyadmin:
image: phpmyadmin/phpmyadmin:4.7
labels:
- traefik.enable=true
- traefik.backend=phpmyadmin
- traefik.frontend.rule=Host:phpmyadmin.app.localhost
environment:
PMA_HOST: "mysql"
PMA_USER: "$MYSQL_USER"
PMA_PASSWORD: "$MYSQL_PASSWORD"
volumes:
mysql_data:
driver: local