-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (52 loc) · 1.47 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
services:
php-cli:
build: docker/php-cli
container_name: '${DOCKER_CONTAINER_BASE_NAME}-php-cli'
volumes:
- './:/var/www/'
working_dir: /var/www
profiles:
- on-demand
depends_on:
- mysql
networks:
- app_network
mysql:
container_name: '${DOCKER_CONTAINER_BASE_NAME}-mysql'
image: 'mysql:8.4'
command: '--sort_buffer_size=512K'
volumes:
- './docker/mysql/mysql.init.sql:/docker-entrypoint-initdb.d/01-databases.sql'
ports:
- '${DOCKER_MYSQL_PORT}:3306'
environment:
MYSQL_ROOT_PASSWORD: root
networks:
- app_network
php-fpm:
build: docker/php-fpm
container_name: '${DOCKER_CONTAINER_BASE_NAME}-php-fpm'
volumes:
- './:/var/www/'
working_dir: /var/www
networks:
- app_network
nginx:
image: 'nginx:stable-alpine'
container_name: '${DOCKER_CONTAINER_BASE_NAME}-nginx'
volumes:
- './public/:/var/www/public/'
- './docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf'
ports:
- '${DOCKER_NGINX_PORT}:80'
depends_on:
- php-fpm
- mysql
working_dir: /var/www
networks:
- app_network
networks:
app_network:
name: '${DOCKER_CONTAINER_BASE_NAME}_app'
volumes:
database_data: null