-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
40 lines (37 loc) · 909 Bytes
/
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
version: '3.5'
services:
apache-php:
depends_on:
- mysql
env_file:
- .env
image: sorrell/question2answer
environment:
MYSQL_USER: ${DB_USER}
MYSQL_PASS: ${DB_PASSWORD}
MYSQL_DB: ${DB_NAME}
MYSQL_HOST: ${DB_HOST}
MYSQL_PORT: ${DB_PORT}
links:
- mysql
ports:
- '${WEB_PORT_HOST}:${WEB_PORT}'
- '${WEB_PORT_HOST_SSL}:${WEB_PORT_SSL}'
mysql:
env_file:
- .env
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_USER: ${DB_USER}
MYSQL_PASS: ${DB_PASSWORD}
MYSQL_DB: ${DB_NAME}
MYSQL_HOST: ${DB_HOST}
MYSQL_PORT: ${DB_PORT}
image: mysql:8.0.23
cap_add:
- SYS_NICE # CAP_SYS_NICE
ports:
- '${DB_PORT_HOST}:${DB_PORT}'
volumes:
- ./schema.sh:/docker-entrypoint-initdb.d/schema.sh
- ./var/lib/mysql:/var/lib/mysql:delegated