This repository was archived by the owner on Aug 10, 2023. It is now read-only.
forked from vanilla/vanilla-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
118 lines (112 loc) · 4.76 KB
/
docker-compose.yml
File metadata and controls
118 lines (112 loc) · 4.76 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: "3.8"
services:
database:
build:
context: "./images/database"
container_name: "database"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: vanilla_dev
networks:
- "vanilla_network"
ports:
- "3306:3306"
volumes:
- "./logs/database:/var/log/mysql:delegated"
- "./resources/etc/mysql/conf.d/:/etc/mysql/conf.d/"
- "datastorage:/var/lib/mysql"
## Put the following in conf/bootstrap.early.php
# // Cache
# saveToConfig('Cache.Enabled', true); # Toggle this to true/false to enable/disable caching.
# saveToConfig('Cache.Method', 'memcached');
# saveToConfig('Cache.Memcached.Store', ['memcached:11211']);
#
# if (c('Cache.Enabled')) {
# if (class_exists('Memcached')) {
# saveToConfig('Cache.Memcached.Option.'.Memcached::OPT_COMPRESSION, true, false);
# saveToConfig('Cache.Memcached.Option.'.Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT, false);
# saveToConfig('Cache.Memcached.Option.'.Memcached::OPT_LIBKETAMA_COMPATIBLE, true, false);
# saveToConfig('Cache.Memcached.Option.'.Memcached::OPT_NO_BLOCK, true, false);
# saveToConfig('Cache.Memcached.Option.'.Memcached::OPT_TCP_NODELAY, true, false);
# saveToConfig('Cache.Memcached.Option.'.Memcached::OPT_CONNECT_TIMEOUT, 1000, false);
# saveToConfig('Cache.Memcached.Option.'.Memcached::OPT_SERVER_FAILURE_LIMIT, 2, false);
# } else {
# die('PHP is missing the Memcached extension.');
# }
# }
#####
memcached:
build:
context: "./images/memcached"
networks:
- "vanilla_network"
container_name: memcached
ports:
- "11211:11211"
nginx:
build:
context: "./images/nginx"
# Transform the template into an actual file
command: /bin/ash -c "envsubst < /etc/nginx/fastcgi.conf.tpl > /etc/nginx/fastcgi.conf && nginx -g 'daemon off;'"
container_name: "nginx"
depends_on:
- "php-fpm"
environment:
- "DOLLAR=$$"
- "FASTCGI_SPLIT_PATH_INFO=${VANILLA_DOCKER_FASTCGI_SPLIT_PATH_INFO}"
- "FASTCGI_INTERCEPT_ERRORS=${VANILLA_DOCKER_FASTCGI_INTERCEPT_ERRORS}"
- "FASTCGI_IGNORE_CLIENT_ABORT=${VANILLA_DOCKER_FASTCGI_IGNORE_CLIENT_ABORT}"
- "FASTCGI_CONNECT_TIMEOUT=${VANILLA_DOCKER_FASTCGI_CONNECT_TIMEOUT}"
- "FASTCGI_SEND_TIMEOUT=${VANILLA_DOCKER_FASTCGI_SEND_TIMEOUT}"
- "FASTCGI_READ_TIMEOUT=${VANILLA_DOCKER_FASTCGI_READ_TIMEOUT}"
- "FASTCGI_BUFFER_SIZE=${VANILLA_DOCKER_FASTCGI_BUFFER_SIZE}"
- "FASTCGI_BUFFERS=${VANILLA_DOCKER_FASTCGI_BUFFERS}"
- "FASTCGI_BUSY_BUFFERS_SIZE=${VANILLA_DOCKER_FASTCGI_BUSY_BUFFERS_SIZE}"
- "FASTCGI_TEMP_FILE_WRITE_SIZE=${VANILLA_DOCKER_FASTCGI_TEMP_FILE_WRITE_SIZE}"
networks:
vanilla_network:
aliases: # Allows (sso|dev).vanilla.localhost to be resolved internally from php-fpm
- "sso.vanilla.localhost"
- "dev.vanilla.localhost"
- "vanilla.test"
- "vanilla.localhost"
ports:
- "80:80"
- "8080:8080"
- "443:443"
volumes:
- "./logs/nginx:/var/log/nginx:delegated"
- "./resources/certificates:/certificates:cached"
- "./resources/etc/nginx/conf.d:/etc/nginx/conf.d:cached"
- "./resources/etc/nginx/sites-available:/etc/nginx/sites-available:cached"
- "./resources/etc/nginx/sites-enabled:/etc/nginx/sites-enabled:cached"
- "../:/srv/vanilla-repositories:cached"
# Don't forget to update docker-compose.unit-test.yml
php-fpm:
build:
context: "./images/php-fpm"
container_name: "php-fpm"
depends_on:
- "database"
networks: &php-networks
- "vanilla_network"
volumes: &php-volumes
- "./logs/php-fpm:/var/log/php-fpm:delegated"
- "./resources/certificates:/usr/local/share/ca-certificates:cached" # Mount extra certificates
- "../:/srv/vanilla-repositories:cached"
php-fpm-xdebug:
build:
context: "./images/php-fpm"
container_name: "php-fpm-xdebug"
environment:
- "PHP_DEBUG=on"
networks: *php-networks
volumes: *php-volumes
volumes:
datastorage:
# Created by our setup script.
external: true
networks:
vanilla_network:
driver: "bridge"
name: "vanilla_network"