-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
90 lines (86 loc) · 1.92 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
version: "3.7"
networks:
frontend:
backend: # Define volumes
volumes:
code:
dbdata:
services:
php:
build:
context: "./.docker/php/"
args:
PHP_VERSION: ${PHP_VERSION}
networks:
- backend
volumes:
- code:/var/www/html/
links:
- mysql
container_name: php
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
DATABASE_URL: mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@mysql:${MYSQL_PORT}/${MYSQL_DATABASE}
DATABASE_TEST_URL: mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@mysql:${MYSQL_PORT}/${MYSQL_TEST_DATABASE}
apache:
build:
context: "./.docker/apache/"
args:
APACHE_VERSION: ${APACHE_VERSION}
depends_on:
- php
- mysql
networks:
- frontend
- backend
ports:
- "80:80"
volumes:
- code:/var/www/html/
container_name: apache
mysql:
image: mariadb:${MYSQL_VERSION:-latest}
volumes:
- ./.docker/mysql/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz
- dbdata:/val/lib/mysql
networks:
- backend
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- 3307:${MYSQL_PORT}
container_name: mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_HOST=mysql
- PMA_PORT=${MYSQL_PORT}
- PMA_USER=root
- PMA_PASSWORD=
networks:
- backend
links:
- mysql
ports:
- "8079:80"
volumes:
- /sessions
container_name: phpmyadmin
# Define synchronization and forwarding sessions
x-mutagen:
sync:
#defaults:
# ignore:
# vcs: true
code:
alpha: "."
beta: "volume://code"
mode: "two-way-resolved"
configurationBeta:
permissions:
defaultOwner: "id:82"
#defaultGroup: "www-data"