-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
56 lines (50 loc) · 1.29 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
55
56
version: '3.7'
# Services
services:
# Nginx Service
nginx:
image: nginx:1.17
ports:
- 80:80
environment:
- NGINX_SERVER_NAME=${LOCAL_DOMAIN}
volumes:
- ./src/${COMPOSE_PROJECT_NAME}:/var/www/:ro
- ./.docker/nginx/conf.d:/etc/nginx/conf.d
depends_on:
- perch
command: /bin/bash -c "envsubst '$$NGINX_SERVER_NAME' < /etc/nginx/conf.d/nginx.conf.template > /etc/nginx/conf.d/nginx.conf && nginx -g 'daemon off;'"
# Perch CMS
perch:
build: ./.docker/perch
working_dir: /var/www/
volumes:
- ./src/${COMPOSE_PROJECT_NAME}:/var/www/
depends_on:
- database
environment:
- HTTP_HOST=tyyliandabs.local
# MySQL Service
database:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${COMPOSE_PROJECT_NAME}
MYSQL_USER: ${PERCH_DB_USERNAME}
MYSQL_PASSWORD: ${PERCH_DB_PASSWORD}
volumes:
- ./.docker/database/my.cnf:/etc/mysql/conf.d/my.cnf:ro
- mysqldata:/var/lib/mysql
- ./${PERCH_DB_FILE}:/docker-entrypoint-initdb.d/backup.sql
# PhpMyAdmin Service
phpmyadmin:
image: phpmyadmin/phpmyadmin:5
ports:
- 8080:80
environment:
PMA_HOST: database
depends_on:
- database
# Volumes
volumes:
mysqldata: