-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (65 loc) · 1.85 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
# docker compose configuration defines local development stack
# docker network config
networks:
main:
driver: bridge
services:
# composer service for managing php dependencies
composer:
image: composer:latest
container_name: becvar_site_composer
working_dir: /app
volumes:
- .:/app
networks:
- main
command: composer install --ignore-platform-reqs
# node service for frontend assets
node:
image: node:latest
container_name: becvar_site_node
working_dir: /app
volumes:
- .:/app
networks:
- main
command: npm run watch
# database service
mysql:
image: mysql:latest
container_name: becvar_site_mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
- ./.docker/configs/mysqld.conf:/etc/mysql/mysql.conf.d/mysqld.cnf
- ./.docker/services/mysql_database:/var/lib/mysql
- ./.docker/services/log:/var/log
mem_limit: 1g
ports:
- "3306:3306"
networks:
- main
# web server service
php:
build:
context: .
dockerfile: ./.docker/Dockerfile
container_name: becvar_site_webserver
restart: always
depends_on:
- mysql
environment:
- DATABASE_DRIVER=pdo_mysql
- DATABASE_HOST=mysql
- DATABASE_PORT=3306
volumes:
- ./.docker/configs/apache-site.conf:/etc/apache2/sites-available/000-default.conf
- ./.docker/configs/php.ini:/usr/local/etc/php/php.ini:ro
- ./.docker/services/log:/var/log
- ./:/var/www
mem_limit: 1g
ports:
- "80:80"
networks:
- main