-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
54 lines (48 loc) · 1.27 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
version: '3.7'
services:
# backend: apache
backend:
build:
context: ./backend
container_name: webpack_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.6.41
container_name: webpack_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}
# mysql default state
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
# frontend: react
app:
build:
context: .
container_name: react_front-${CONTAINER_PREFIX}
restart: always
volumes:
- "./react-app/public:/app/public"
- "./react-app/src:/app/src"
command: npm start
ports:
- 3000:3000
environment:
- NODE_ENV=development
volumes:
db_data:
name: webpack_vol-${CONTAINER_PREFIX}