Use custom Dockerfiles instead of mounting files for remote docker #104
This commit is contained in:
parent
b120af8e7f
commit
3c2f4b52e1
@ -0,0 +1,4 @@
|
|||||||
|
FROM nextcloud:apache
|
||||||
|
|
||||||
|
COPY autoconfig.php /usr/src/nextcloud/config/autoconfig.php
|
||||||
|
COPY redis.php /usr/src/nextcloud/config/redis.php
|
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
$AUTOCONFIG = array(
|
||||||
|
'directory' => '/var/www/html/data',
|
||||||
|
'dbtype' => 'mysql',
|
||||||
|
'dbname' => getenv('MYSQL_DATABASE'),
|
||||||
|
'dbuser' => getenv('MYSQL_USER'),
|
||||||
|
'dbpass' => getenv('MYSQL_PASSWORD'),
|
||||||
|
'dbhost' => 'db',
|
||||||
|
'dbtableprefix' => '',
|
||||||
|
);
|
3
.examples/docker-compose/with-nginx-proxy/apache/db.env
Normal file
3
.examples/docker-compose/with-nginx-proxy/apache/db.env
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
MYSQL_PASSWORD=
|
||||||
|
MYSQL_DATABASE=nextcloud
|
||||||
|
MYSQL_USER=nextcloud
|
@ -13,7 +13,7 @@ networks:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
proxy:
|
proxy:
|
||||||
image: jwilder/nginx-proxy
|
build: proxy
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
@ -23,7 +23,6 @@ services:
|
|||||||
- html:/usr/share/nginx/html
|
- html:/usr/share/nginx/html
|
||||||
- certs:/etc/nginx/certs:ro
|
- certs:/etc/nginx/certs:ro
|
||||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||||
- ./uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf:ro
|
|
||||||
networks:
|
networks:
|
||||||
- proxy-tier
|
- proxy-tier
|
||||||
labels:
|
labels:
|
||||||
@ -43,9 +42,11 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: nextcloud:apache
|
build: app
|
||||||
volumes:
|
volumes:
|
||||||
- nextcloud:/var/www/html
|
- nextcloud:/var/www/html
|
||||||
|
env_file:
|
||||||
|
- db.env
|
||||||
environment:
|
environment:
|
||||||
- VIRTUAL_HOST=
|
- VIRTUAL_HOST=
|
||||||
- LETSENCRYPT_HOST=
|
- LETSENCRYPT_HOST=
|
||||||
@ -61,9 +62,8 @@ services:
|
|||||||
- db:/var/lib/mysql
|
- db:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=
|
- MYSQL_ROOT_PASSWORD=
|
||||||
- MYSQL_DATABASE=nextcloud
|
env_file:
|
||||||
- MYSQL_USER=nextcloud
|
- db.env
|
||||||
- MYSQL_PASSWORD=
|
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
FROM jwilder/nginx-proxy:alpine
|
||||||
|
|
||||||
|
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf
|
@ -0,0 +1,4 @@
|
|||||||
|
FROM nextcloud:fpm
|
||||||
|
|
||||||
|
COPY autoconfig.php /usr/src/nextcloud/config/autoconfig.php
|
||||||
|
COPY redis.php /usr/src/nextcloud/config/redis.php
|
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
$AUTOCONFIG = array(
|
||||||
|
'directory' => '/var/www/html/data',
|
||||||
|
'dbtype' => 'mysql',
|
||||||
|
'dbname' => getenv('MYSQL_DATABASE'),
|
||||||
|
'dbuser' => getenv('MYSQL_USER'),
|
||||||
|
'dbpass' => getenv('MYSQL_PASSWORD'),
|
||||||
|
'dbhost' => 'db',
|
||||||
|
'dbtableprefix' => '',
|
||||||
|
);
|
3
.examples/docker-compose/with-nginx-proxy/fpm/db.env
Normal file
3
.examples/docker-compose/with-nginx-proxy/fpm/db.env
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
MYSQL_PASSWORD=
|
||||||
|
MYSQL_DATABASE=nextcloud
|
||||||
|
MYSQL_USER=nextcloud
|
@ -13,7 +13,7 @@ networks:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
proxy:
|
proxy:
|
||||||
image: jwilder/nginx-proxy
|
build: proxy
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
@ -23,7 +23,6 @@ services:
|
|||||||
- html:/usr/share/nginx/html
|
- html:/usr/share/nginx/html
|
||||||
- certs:/etc/nginx/certs:ro
|
- certs:/etc/nginx/certs:ro
|
||||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||||
- ./uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf:ro
|
|
||||||
networks:
|
networks:
|
||||||
- proxy-tier
|
- proxy-tier
|
||||||
labels:
|
labels:
|
||||||
@ -43,9 +42,8 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: nginx
|
build: web
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
||||||
- nextcloud:/var/www/html
|
- nextcloud:/var/www/html
|
||||||
environment:
|
environment:
|
||||||
- VIRTUAL_HOST=
|
- VIRTUAL_HOST=
|
||||||
@ -57,7 +55,9 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: nextcloud:fpm
|
build: app
|
||||||
|
env_file:
|
||||||
|
- db.env
|
||||||
volumes:
|
volumes:
|
||||||
- nextcloud:/var/www/html
|
- nextcloud:/var/www/html
|
||||||
restart: always
|
restart: always
|
||||||
@ -66,17 +66,16 @@ services:
|
|||||||
image: mariadb
|
image: mariadb
|
||||||
volumes:
|
volumes:
|
||||||
- db:/var/lib/mysql
|
- db:/var/lib/mysql
|
||||||
|
env_file:
|
||||||
|
- db.env
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=
|
- MYSQL_ROOT_PASSWORD=
|
||||||
- MYSQL_DATABASE=nextcloud
|
|
||||||
- MYSQL_USER=nextcloud
|
|
||||||
- MYSQL_PASSWORD=
|
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
collabora:
|
collabora:
|
||||||
image: collabora/code
|
image: collabora/code
|
||||||
cap_add:
|
cap_add:
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
FROM jwilder/nginx-proxy:alpine
|
||||||
|
|
||||||
|
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf
|
@ -0,0 +1,3 @@
|
|||||||
|
FROM nginx
|
||||||
|
|
||||||
|
COPY nginx.conf /etc/nginx/nginx.conf
|
Loading…
Reference in New Issue
Block a user