-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
54 lines (49 loc) · 1.21 KB
/
docker-compose.yaml
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
version: "3.8"
networks:
nginx-php-7.4-mysql-8:
services:
# ngnx
nginx:
image: nginx:stable-alpine
container_name: nginx_alp
ports:
- "8080:80"
volumes:
- ./:/var/www/music-parser
- ./deployment/nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf
links:
- php-7.4
# контейнер nginx должен запуститься после php и postgres
depends_on:
- php-7.4
- mysql-8
networks:
- nginx-php-7.4-mysql-8
# php
php-7.4:
build:
context: .
dockerfile: ./deployment/php/Dockerfile
container_name: php-7.4
ports:
- "9000:9000"
volumes:
- ./:/var/www/music-parser
networks:
- nginx-php-7.4-mysql-8
# mysql
mysql-8:
image: mysql:8
container_name: mysql-8
ports:
- "4306:3306"
volumes:
- ./deployment/mysql/volumes:/var/lib/mysql
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
restart: always
environment:
MYSQL_USER: ${MYSQL_USER}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
networks:
- nginx-php-7.4-mysql-8