-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·37 lines (34 loc) · 944 Bytes
/
docker-compose.yml
File metadata and controls
executable file
·37 lines (34 loc) · 944 Bytes
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
version: "3"
services:
# php apache
apache:
build:
context: .
container_name: php-${CONTAINER_PREFIX}
restart: always
volumes:
- "./backend:/var/www/backend"
- ./apache2.conf:/etc/apache2/apache2.conf
ports:
- ${APP_PORT}:80
links:
- mysql
depends_on:
- mysql
working_dir: /var/www/backend
# data persistence service layer
mysql:
image: mysql:5.7.20
container_name: mysql-${CONTAINER_PREFIX}
volumes:
- "db_data:/var/lib/mysql"
- "./mysql/initial_data:/docker-entrypoint-initdb.d"
ports:
- ${DB_PORT}:3306
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
command: mysqld --sql_mode="" --character-set-server=utf8 --collation-server=utf8_slovenian_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0
volumes:
db_data:
# external: true
name: mysql-php-vol-${CONTAINER_PREFIX}