-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (69 loc) · 1.45 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
version: '3.2'
services:
web:
build: .
stdin_open: true
tty: true
ports:
- "8080:8080"
volumes:
- "/app/node_modules"
- ".:/app"
container_name: web
back:
build:
context: './php/'
args:
PHP_VERSION: 7.3-apache
depends_on:
- mysql
links:
- mysql
networks:
- backend
ports:
- "8082:80"
volumes:
- ${PROJECT_ROOT}/:/var/www/html/
container_name: back
mysql:
build:
context: './mysql/'
command: --default-authentication-plugin=mysql_native_password
restart: always
ports:
- "3306:3306"
volumes:
- ./mysql/schema.sql:/docker-entrypoint-initdb.d/1.sql
networks:
- backend
# The default MySQL installation only creates the "root" administrative account
# create new users using docker-compose exec
environment:
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
container_name: mysql
phpmyadmin:
depends_on:
- mysql
links:
- mysql
image: phpmyadmin/phpmyadmin
restart: always
ports:
- '8081:80'
environment:
PMA_HOST: mysql
MYSQL_USERNAME: "${DB_USERNAME}"
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
networks:
- backend
volumes:
- /sessions
container_name: phpmyadmin
networks:
backend:
volumes:
data: