Updated nextcloud to work dynamically with www-data ID and GID
This commit is contained in:
@@ -6,19 +6,22 @@ volumes:
|
||||
driver_opts:
|
||||
type: none
|
||||
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:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
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:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
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:
|
||||
@@ -35,7 +38,11 @@ services:
|
||||
- MYSQL_USER=nextcloud
|
||||
|
||||
nextcloud:
|
||||
build: ./nc-fpm
|
||||
build:
|
||||
context: ./nc-fpm
|
||||
args:
|
||||
UID: ${MUID}
|
||||
GID: ${MGID}
|
||||
restart: always
|
||||
links:
|
||||
- db
|
||||
@@ -50,17 +57,25 @@ services:
|
||||
- REDIS_HOST=redis
|
||||
|
||||
nginx:
|
||||
build: ./nginx
|
||||
build:
|
||||
context: ./nginx
|
||||
args:
|
||||
UID: ${MUID}
|
||||
GID: ${MGID}
|
||||
restart: always
|
||||
ports:
|
||||
- 8888:80
|
||||
- 8899:80
|
||||
links:
|
||||
- nextcloud
|
||||
volumes:
|
||||
- nchome:/var/www/html:z,ro
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
build:
|
||||
context: ./redis
|
||||
args:
|
||||
UID: ${MUID}
|
||||
GID: ${MGID}
|
||||
restart: always
|
||||
|
||||
cron:
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
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 usermod -u 82 -o www-data
|
||||
RUN usermod -u $UID -o www-data
|
||||
RUN apt update \
|
||||
&& apt -y install libmagickcore-6.q16-6-extra ffmpeg imagemagick ghostscript \
|
||||
&& 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
|
||||
|
||||
@@ -31,7 +31,7 @@ http {
|
||||
#gzip on;
|
||||
|
||||
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