-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
35 lines (34 loc) · 991 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
version: "3"
services:
web:
build: ./web-image
hostname: web
ports:
- "${SERVER_PORT}:80"
environment:
DB_SERVER_HOST: database
DB_SERVER_PORT: ${MYSQL_PORT}
DB_SERVER_USER: ${MYSQL_USER}
DB_SERVER_PASSWORD: ${MYSQL_PASSWORD}
DB_SERVER_DB: ${MYSQL_DB}
working_dir: /var/www/html/
volumes:
- ./www:/var/www/html/
- ./config/custom_php.ini:/usr/local/etc/php/conf.d/custom_php.ini
restart: unless-stopped
database:
image: mysql:8.0.28
hostname: database
environment:
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_TCP_PORT: ${MYSQL_PORT}
MYSQL_DATABASE: ${MYSQL_DB}
ADMIN_ACCOUNT: ${ADMIN_ACCOUNT}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
ADMIN_PROFILE: ${ADMIN_PROFILE}
volumes:
- ./db/initial:/docker-entrypoint-initdb.d
- ./db/persist:/var/lib/mysql
restart: unless-stopped