Updated nextcloud to work dynamically with www-data ID and GID
This commit is contained in:
@@ -6,19 +6,22 @@ volumes:
|
|||||||
driver_opts:
|
driver_opts:
|
||||||
type: none
|
type: none
|
||||||
o: bind
|
o: bind
|
||||||
device: /srv/dev-disk-by-uuid-f3ca381b-e85a-4348-8086-833317c5d96e/dockerstorage/nextcloud/home
|
device: /nctest/home
|
||||||
|
# device: /srv/dev-disk-by-uuid-f3ca381b-e85a-4348-8086-833317c5d96e/dockerstorage/nextcloud/home
|
||||||
ncdb:
|
ncdb:
|
||||||
driver: local
|
driver: local
|
||||||
driver_opts:
|
driver_opts:
|
||||||
type: none
|
type: none
|
||||||
o: bind
|
o: bind
|
||||||
device: /srv/dev-disk-by-uuid-f3ca381b-e85a-4348-8086-833317c5d96e/dockerstorage/nextcloud/database
|
device: /nctest/db
|
||||||
|
# device: /srv/dev-disk-by-uuid-f3ca381b-e85a-4348-8086-833317c5d96e/dockerstorage/nextcloud/database
|
||||||
ncdata:
|
ncdata:
|
||||||
driver: local
|
driver: local
|
||||||
driver_opts:
|
driver_opts:
|
||||||
type: none
|
type: none
|
||||||
o: bind
|
o: bind
|
||||||
device: /srv/dev-disk-by-uuid-f3ca381b-e85a-4348-8086-833317c5d96e/dockerstorage/nextcloud/storage
|
device: /nctest/storage
|
||||||
|
# device: /srv/dev-disk-by-uuid-f3ca381b-e85a-4348-8086-833317c5d96e/dockerstorage/nextcloud/storage
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
@@ -35,7 +38,11 @@ services:
|
|||||||
- MYSQL_USER=nextcloud
|
- MYSQL_USER=nextcloud
|
||||||
|
|
||||||
nextcloud:
|
nextcloud:
|
||||||
build: ./nc-fpm
|
build:
|
||||||
|
context: ./nc-fpm
|
||||||
|
args:
|
||||||
|
UID: ${MUID}
|
||||||
|
GID: ${MGID}
|
||||||
restart: always
|
restart: always
|
||||||
links:
|
links:
|
||||||
- db
|
- db
|
||||||
@@ -50,17 +57,25 @@ services:
|
|||||||
- REDIS_HOST=redis
|
- REDIS_HOST=redis
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
build: ./nginx
|
build:
|
||||||
|
context: ./nginx
|
||||||
|
args:
|
||||||
|
UID: ${MUID}
|
||||||
|
GID: ${MGID}
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8888:80
|
- 8899:80
|
||||||
links:
|
links:
|
||||||
- nextcloud
|
- nextcloud
|
||||||
volumes:
|
volumes:
|
||||||
- nchome:/var/www/html:z,ro
|
- nchome:/var/www/html:z,ro
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:latest
|
build:
|
||||||
|
context: ./redis
|
||||||
|
args:
|
||||||
|
UID: ${MUID}
|
||||||
|
GID: ${MGID}
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
cron:
|
cron:
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
FROM nextcloud:fpm
|
FROM nextcloud:fpm
|
||||||
|
|
||||||
|
ARG UID=1000
|
||||||
|
ARG GID=1000
|
||||||
|
|
||||||
#RUN adduser --system --no-create-home --home /nonexistent --gecos 'www-data user' --shell /bin/false --uid 82 www-data
|
#RUN adduser --system --no-create-home --home /nonexistent --gecos 'www-data user' --shell /bin/false --uid 82 www-data
|
||||||
RUN usermod -u 82 -o www-data
|
RUN usermod -u $UID -o www-data
|
||||||
RUN apt update \
|
RUN apt update \
|
||||||
&& apt -y install libmagickcore-6.q16-6-extra ffmpeg imagemagick ghostscript \
|
&& apt -y install libmagickcore-6.q16-6-extra ffmpeg imagemagick ghostscript \
|
||||||
&& apt clean
|
&& apt clean
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
FROM nginx:alpine
|
#FROM nginx:alpine
|
||||||
|
FROM nginx:bullseye
|
||||||
|
|
||||||
RUN adduser --system --no-create-home --home /nonexistent --gecos 'www-data user' --shell /bin/false --uid 82 www-data
|
ARG UID=1000
|
||||||
|
ARG GID=1000
|
||||||
|
|
||||||
|
RUN usermod -u $UID -o www-data
|
||||||
|
|
||||||
|
#RUN adduser --system --no-create-home --home /nonexistent --gecos 'www-data user' --shell /bin/false --uid $UID www-data
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ http {
|
|||||||
#gzip on;
|
#gzip on;
|
||||||
|
|
||||||
upstream php-handler {
|
upstream php-handler {
|
||||||
server app:9000;
|
server nextcloud:9000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FROM redis:latest
|
||||||
|
|
||||||
|
ARG UID=1000
|
||||||
|
ARG GID=1000
|
||||||
|
|
||||||
|
RUN usermod -u $UID -o www-data
|
||||||
Reference in New Issue
Block a user