-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (44 loc) · 1.07 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
version: '3.9'
networks:
php_network:
driver: bridge
services:
php_app:
depends_on:
- mysql_php
build: .
container_name: php_app
ports:
- "8000:80"
working_dir: /var/www/html
volumes:
- /var/www/html/vendor/
- ./:/var/www/html
- ./docker/server/apache/sites-enabled:/etc/apache2/sites-enabled
- ./docker/server/php/php.ini:/usr/local/etc/php/conf.d/extra-php-config.ini
restart: always
networks:
- php_network
mysql_php:
image: mariadb:10.5.9
restart: always
container_name: mysql_php
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: bpchallenge
MYSQL_USER: bpuser
MYSQL_PASSWORD: bppass
ports:
# <Port exposed> : < MySQL Port running inside container>
- '3306:3306'
volumes:
- db_data:/var/lib/mysql
- ./docker/db/mariadb/my.cnf:/etc/mysql/conf.d/my.cnf
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=rootpass
interval: 5s
retries: 5
networks:
- php_network
volumes:
db_data: