rework of docker-compose examples
This commit is contained in:
parent
83b027fbae
commit
e87d8d1217
@ -1,97 +0,0 @@
|
||||
version: '2'
|
||||
services:
|
||||
proxy:
|
||||
image: jwilder/nginx-proxy
|
||||
container_name: proxy
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
- ./proxy/conf.d:/etc/nginx/conf.d
|
||||
- ./proxy/vhost.d:/etc/nginx/vhost.d
|
||||
- ./proxy/html:/usr/share/nginx/html
|
||||
- ./proxy/certs:/etc/nginx/certs:ro
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
networks:
|
||||
- proxy-tier
|
||||
restart: always
|
||||
|
||||
letsencrypt-companion:
|
||||
image: alastaircoote/docker-letsencrypt-nginx-proxy-companion
|
||||
container_name: letsencrypt-companion
|
||||
volumes_from:
|
||||
- proxy
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- ./proxy/certs:/etc/nginx/certs:rw
|
||||
restart: always
|
||||
|
||||
web:
|
||||
image: nginx
|
||||
container_name: nextcloud_webserver
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
links:
|
||||
- app
|
||||
- collabora
|
||||
volumes_from:
|
||||
- app
|
||||
environment:
|
||||
- VIRTUAL_HOST=${DOMAIN}
|
||||
- VIRTUAL_NETWORK=nginx-proxy
|
||||
- VIRTUAL_PORT=80
|
||||
- LETSENCRYPT_HOST=${DOMAIN}
|
||||
- LETSENCRYPT_EMAIL=
|
||||
networks:
|
||||
- proxy-tier
|
||||
restart: always
|
||||
|
||||
app:
|
||||
image: nextcloud:fpm
|
||||
container_name: nextcloud_fpm
|
||||
links:
|
||||
- db
|
||||
volumes:
|
||||
- ./nextcloud/apps:/var/www/html/apps
|
||||
- ./nextcloud/config:/var/www/html/config
|
||||
- ./nextcloud/data:/var/www/html/data
|
||||
networks:
|
||||
- proxy-tier
|
||||
restart: always
|
||||
|
||||
db:
|
||||
image: mariadb
|
||||
container_name: db
|
||||
volumes:
|
||||
- ./nextcloud/db:/var/lib/mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=
|
||||
- MYSQL_DATABASE=nextcloud
|
||||
- MYSQL_USER=nextcloud
|
||||
- MYSQL_PASSWORD=
|
||||
networks:
|
||||
- proxy-tier
|
||||
restart: always
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
container_name: redis
|
||||
networks:
|
||||
- proxy-tier
|
||||
restart: always
|
||||
|
||||
collabora:
|
||||
image: collabora/code
|
||||
container_name: collabora
|
||||
cap_add:
|
||||
- MKNOD
|
||||
environment:
|
||||
- domain=${DOMAIN}
|
||||
networks:
|
||||
- proxy-tier
|
||||
restart: always
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
||||
external:
|
||||
name: nginx-proxy
|
12
.examples/docker-compose/with-nginx-proxy/apache/caching.php
Normal file
12
.examples/docker-compose/with-nginx-proxy/apache/caching.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?
|
||||
$CONFIG = array (
|
||||
'memcache.local' => '\\OC\\Memcache\\APCu',
|
||||
'memcache.locking' => '\\OC\\Memcache\\Redis',
|
||||
'filelocking.enabled' => 'true',
|
||||
'redis' =>
|
||||
array (
|
||||
'host' => 'redis',
|
||||
'port' => 6379,
|
||||
),
|
||||
);
|
||||
?>
|
@ -0,0 +1,79 @@
|
||||
version: '3'
|
||||
|
||||
volumes:
|
||||
certs:
|
||||
conf.d:
|
||||
vhost.d:
|
||||
html:
|
||||
nextcloud:
|
||||
db:
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
||||
|
||||
services:
|
||||
proxy:
|
||||
image: jwilder/nginx-proxy
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
- conf.d:/etc/nginx/conf.d
|
||||
- vhost.d:/etc/nginx/vhost.d
|
||||
- html:/usr/share/nginx/html
|
||||
- certs:/etc/nginx/certs:ro
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
- ./uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf:ro
|
||||
networks:
|
||||
- proxy-tier
|
||||
labels:
|
||||
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
|
||||
restart: always
|
||||
|
||||
letsencrypt-companion:
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
volumes:
|
||||
- conf.d:/etc/nginx/conf.d
|
||||
- vhost.d:/etc/nginx/vhost.d
|
||||
- html:/usr/share/nginx/html
|
||||
- certs:/etc/nginx/certs:rw
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
networks:
|
||||
- proxy-tier
|
||||
restart: always
|
||||
|
||||
app:
|
||||
image: nextcloud:apache
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
environment:
|
||||
- VIRTUAL_HOST=
|
||||
- LETSENCRYPT_HOST=
|
||||
- LETSENCRYPT_EMAIL=
|
||||
networks:
|
||||
- proxy-tier
|
||||
- default
|
||||
restart: always
|
||||
|
||||
db:
|
||||
image: mariadb
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=
|
||||
- MYSQL_DATABASE=nextcloud
|
||||
- MYSQL_USER=nextcloud
|
||||
- MYSQL_PASSWORD=
|
||||
restart: always
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
restart: always
|
||||
|
||||
collabora:
|
||||
image: collabora/code
|
||||
cap_add:
|
||||
- MKNOD
|
||||
environment:
|
||||
- domain=
|
||||
restart: always
|
@ -0,0 +1 @@
|
||||
client_max_body_size 10g;
|
12
.examples/docker-compose/with-nginx-proxy/fpm/caching.php
Normal file
12
.examples/docker-compose/with-nginx-proxy/fpm/caching.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?
|
||||
$CONFIG = array (
|
||||
'memcache.local' => '\\OC\\Memcache\\APCu',
|
||||
'memcache.locking' => '\\OC\\Memcache\\Redis',
|
||||
'filelocking.enabled' => 'true',
|
||||
'redis' =>
|
||||
array (
|
||||
'host' => 'redis',
|
||||
'port' => 6379,
|
||||
),
|
||||
);
|
||||
?>
|
@ -0,0 +1,86 @@
|
||||
version: '3'
|
||||
|
||||
volumes:
|
||||
certs:
|
||||
conf.d:
|
||||
vhost.d:
|
||||
html:
|
||||
nextcloud:
|
||||
db:
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
||||
|
||||
services:
|
||||
proxy:
|
||||
image: jwilder/nginx-proxy
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
- conf.d:/etc/nginx/conf.d
|
||||
- vhost.d:/etc/nginx/vhost.d
|
||||
- html:/usr/share/nginx/html
|
||||
- certs:/etc/nginx/certs:ro
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
- ./uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf:ro
|
||||
networks:
|
||||
- proxy-tier
|
||||
labels:
|
||||
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
|
||||
restart: always
|
||||
|
||||
letsencrypt-companion:
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
volumes:
|
||||
- conf.d:/etc/nginx/conf.d
|
||||
- vhost.d:/etc/nginx/vhost.d
|
||||
- html:/usr/share/nginx/html
|
||||
- certs:/etc/nginx/certs:rw
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
networks:
|
||||
- proxy-tier
|
||||
restart: always
|
||||
|
||||
web:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- nextcloud:/var/www/html
|
||||
environment:
|
||||
- VIRTUAL_HOST=
|
||||
- LETSENCRYPT_HOST=
|
||||
- LETSENCRYPT_EMAIL=
|
||||
networks:
|
||||
- proxy-tier
|
||||
- default
|
||||
restart: always
|
||||
|
||||
app:
|
||||
image: nextcloud:fpm
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
restart: always
|
||||
|
||||
db:
|
||||
image: mariadb
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=
|
||||
- MYSQL_DATABASE=nextcloud
|
||||
- MYSQL_USER=nextcloud
|
||||
- MYSQL_PASSWORD=
|
||||
restart: always
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
restart: always
|
||||
|
||||
collabora:
|
||||
image: collabora/code
|
||||
cap_add:
|
||||
- MKNOD
|
||||
environment:
|
||||
- domain=
|
||||
restart: always
|
@ -0,0 +1 @@
|
||||
client_max_body_size 10g;
|
Loading…
Reference in New Issue
Block a user