Add nextcloud image
This commit is contained in:
parent
d445345d17
commit
f43f245e1d
6 changed files with 76 additions and 6 deletions
|
@ -1,17 +1,51 @@
|
||||||
|
FROM debian:latest AS BUILDER
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get upgrade -y
|
||||||
|
RUN apt-get install -y zip unzip git curl wget
|
||||||
|
|
||||||
|
|
||||||
|
WORKDIR /var/www
|
||||||
|
|
||||||
|
RUN git clone https://github.com/nextcloud/server html
|
||||||
|
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
RUN git checkout v30.0.2
|
||||||
|
RUN git submodule update --init --recursive
|
||||||
|
|
||||||
|
RUN rm -rf .git
|
||||||
|
|
||||||
|
|
||||||
FROM git.zontreck.com/ariascreations/buildenvironments:debianbuild
|
FROM git.zontreck.com/ariascreations/buildenvironments:debianbuild
|
||||||
|
|
||||||
|
|
||||||
RUN apt-get install -y apache2 apache2-utils php8.3 php8.3-gd php8.3-mysql php8.3-mbstring php8.3-xml
|
RUN apt-get install -y apache2 apache2-utils php8.2 php8.2-gd php8.2-mysql php8.2-mbstring php8.2-xml php8.2-imagick imagemagick unzip zip php8.2-zip php8.2-curl php8.2-sqlite rsync
|
||||||
|
|
||||||
|
RUN apt-get install -y php8.2-bcmath php8.2-gmp php8.2-intl cron
|
||||||
|
|
||||||
ENV MOUNTPOINT /var/www/html
|
ENV MOUNTPOINT /var/www/html
|
||||||
ENV NEXTCLOUD_VERSION 30.0.2
|
ENV NEXTCLOUD_VERSION 30.0.2
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/
|
||||||
RUN rm index.html
|
|
||||||
|
|
||||||
RUN curl -sO "https://github.com/nextcloud/server/archive/refs/tags/v${NEXTCLOUD_VERSION}.tar.gz"
|
COPY --from=BUILDER /var/www/html /var/www/htmlx
|
||||||
RUN tar -xvf "v${NEXTCLOUD_VERSION}.tar.gz"
|
|
||||||
|
WORKDIR /var/www/htmlx
|
||||||
|
|
||||||
|
RUN chown -R www-data:www-data /var/www/htmlx
|
||||||
|
COPY ./upload.ini /etc/php/8.2/apache2/conf.d/upload.ini
|
||||||
|
|
||||||
|
WORKDIR /etc/apache2/sites-enabled
|
||||||
|
RUN rm -f *
|
||||||
|
ADD ./default.conf ./default.conf
|
||||||
|
|
||||||
|
WORKDIR /var/www/htmlx
|
||||||
|
|
||||||
|
ADD ./entrypoint.sh /
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
ADD ./cron_task /etc/crontab
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
CMD ["apache2ctl", "-D", "FOREGROUND"]
|
CMD [ "crontab", "/etc/crontab" ]
|
||||||
|
ENTRYPOINT [ "/entrypoint.sh" ]
|
1
NextCloud/cron_task
Normal file
1
NextCloud/cron_task
Normal file
|
@ -0,0 +1 @@
|
||||||
|
*/5 * * * * www-data php /var/www/html/cron.php > /dev/null 2>&1
|
16
NextCloud/default.conf
Normal file
16
NextCloud/default.conf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<VirtualHost *:80>
|
||||||
|
|
||||||
|
DocumentRoot /var/www/html
|
||||||
|
|
||||||
|
<Directory /var/www/html>
|
||||||
|
AllowOverride All
|
||||||
|
Order deny,allow
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# Disable HTTP TRACE method.
|
||||||
|
TraceEnable off
|
||||||
|
<Files ".ht*">
|
||||||
|
Require all denied
|
||||||
|
</Files>
|
||||||
|
</VirtualHost>
|
12
NextCloud/entrypoint.sh
Normal file
12
NextCloud/entrypoint.sh
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -f /var/www/html/.fresh ]
|
||||||
|
then
|
||||||
|
rsync -a --progress -h --delete /var/www/htmlx/ /var/www/html/
|
||||||
|
fi
|
||||||
|
|
||||||
|
crontab /etc/crontab
|
||||||
|
service cron start
|
||||||
|
|
||||||
|
chown -Rv www-data:www-data /var/www/html
|
||||||
|
apache2ctl -D FOREGROUND
|
7
NextCloud/upload.ini
Normal file
7
NextCloud/upload.ini
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
file_uploads = On
|
||||||
|
memory_limit = 512M
|
||||||
|
upload_max_filesize = 200G
|
||||||
|
post_max_size = 200G
|
||||||
|
max_execution_time = 600
|
||||||
|
|
||||||
|
opcache.interned_strings_buffer = 16
|
0
build.sh
Normal file → Executable file
0
build.sh
Normal file → Executable file
Loading…
Reference in a new issue