forked from nystudio107/craft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·81 lines (79 loc) · 2.02 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: '3.7'
services:
# nginx - web server
nginx:
build:
context: .
dockerfile: ./docker-config/nginx/Dockerfile
env_file: &env
- ./cms/.env
links:
- php
ports:
- "8000:80"
volumes:
- cpresources:/var/www/project/cms/web/cpresources
- ./cms/web:/var/www/project/cms/web:cached
# php - personal home page
php:
build:
context: .
dockerfile: ./docker-config/php-dev-craft/Dockerfile
depends_on:
- "mariadb"
- "redis"
env_file:
*env
expose:
- "9000"
links:
- mariadb
- redis
volumes:
- cpresources:/var/www/project/cms/web/cpresources
- storage:/var/www/project/cms/storage
- ./cms:/var/www/project/cms:cached
- ./cms/vendor:/var/www/project/cms/vendor:delegated
- ./cms/storage/logs:/var/www/project/cms/storage/logs:delegated
# mariadb - database
mariadb:
build:
context: .
dockerfile: ./docker-config/mariadb/Dockerfile
env_file:
*env
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: project
MYSQL_USER: project
MYSQL_PASSWORD: project
ports:
- "3306:3306"
volumes:
- db-data:/var/lib/mysql
# redis - key/value database for caching & php sessions
redis:
build:
context: .
dockerfile: ./docker-config/redis/Dockerfile
expose:
- "6379"
# webpack - frontend build system
webpack:
build:
context: .
dockerfile: ./docker-config/webpack-dev-craft/Dockerfile
env_file:
*env
ports:
- "8080:8080"
volumes:
- ./docker-config/webpack-dev-craft:/var/www/project/docker-config/webpack-dev-craft:cached
- ./docker-config/webpack-dev-craft/node_modules:/var/www/project/docker-config/webpack-dev-craft/node_modules:delegated
- ./cms/web/dist:/var/www/project/cms/web/dist:delegated
- ./src:/var/www/project/src:cached
- ./cms/templates:/var/www/project/cms/templates:cached
volumes:
db-data:
cpresources:
storage: