This commit is contained in:
2023-07-25 13:00:20 +00:00
6 changed files with 43 additions and 10 deletions
+21 -6
View File
@@ -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-8ad400b8-bff1-4ae4-971c-9002f823ba0c/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-8ad400b8-bff1-4ae4-971c-9002f823ba0c/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-8ad400b8-bff1-4ae4-971c-9002f823ba0c/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,7 +57,11 @@ 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 - 8888:80
@@ -60,7 +71,11 @@ services:
- 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:
+4 -1
View File
@@ -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
+8 -2
View File
@@ -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
+1 -1
View File
@@ -31,7 +31,7 @@ http {
#gzip on; #gzip on;
upstream php-handler { upstream php-handler {
server app:9000; server nextcloud:9000;
} }
+6
View File
@@ -0,0 +1,6 @@
FROM redis:latest
ARG UID=1000
ARG GID=1000
RUN usermod -u $UID -o www-data
+3
View File
@@ -0,0 +1,3 @@
MUID="$(id -u www-data)" MGID="$(id -g www-data)" docker-compose build --no-cache
MUID="$(id -u www-data)" MGID="$(id -g www-data)" docker-compose up -d --force-recreate