diff options
author | tobiasKaminsky <tobias@kaminsky.me> | 2018-03-06 10:41:58 +0300 |
---|---|---|
committer | tobiasKaminsky <tobias@kaminsky.me> | 2018-03-06 14:10:20 +0300 |
commit | a0bc5e48b69a8f1766c49d3bbdc79c66e5640580 (patch) | |
tree | 6f3e9d7ceecbd6e0dae71117d580a5b7093fb7c5 /server | |
parent | b0598187b271157f1f1fb5a2cb2e830dd942cacd (diff) |
adds server based on latest master
Diffstat (limited to 'server')
-rw-r--r-- | server/Dockerfile | 37 | ||||
-rw-r--r-- | server/init.sh | 26 | ||||
-rw-r--r-- | server/php.ini | 7 |
3 files changed, 70 insertions, 0 deletions
diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..8d3fda9 --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,37 @@ +FROM debian:stretch + +RUN apt-get update \ + && apt-get install -y \ + php \ + php-curl \ + php-gd \ + php-imagick \ + php-mbstring \ + php-pdo-mysql \ + php-pdo-pgsql \ + php-redis \ + php-sqlite3 \ + php-xml \ + php-zip \ + git \ + && apt-get autoremove -y \ + && apt-get autoclean \ + && apt-get clean \ + && rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* + +COPY php.ini /etc/php/7.0/apache2/conf.d/30-php.ini + +WORKDIR /var/www/html + +RUN rm index.html +RUN git clone https://github.com/nextcloud/server.git . +RUN git submodule update --init + +RUN chown -R www-data:www-data . +RUN chsh -s /bin/bash www-data + +ADD init.sh /initnc.sh +RUN chmod +x /initnc.sh + +EXPOSE 80 +ENTRYPOINT /initnc.sh
\ No newline at end of file diff --git a/server/init.sh b/server/init.sh new file mode 100644 index 0000000..4cc8865 --- /dev/null +++ b/server/init.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +export BRANCH=${BRANCH:=master} + +#Where we do all the work +cd /var/www/html/ + +#Update code +su www-data -c " +git checkout ${BRANCH} +git pull +git submodule update + +#init +php occ maintenance:install --admin-user=admin --admin-pass=admin +OC_PASS=test php occ user:add --password-from-env -- test + +#Trusted domains +php occ config:system:set trusted_domains 1 --value=* +" + +set -e + +. /etc/apache2/envvars + +apache2 -DFOREGROUND "$@"
\ No newline at end of file diff --git a/server/php.ini b/server/php.ini new file mode 100644 index 0000000..f588f0c --- /dev/null +++ b/server/php.ini @@ -0,0 +1,7 @@ +opcache.enable=1 +opcache.enable_cli=1 +opcache.interned_strings_buffer=8 +opcache.max_accelerated_files=10000 +opcache.memory_consumption=128 +opcache.save_comments=1 +opcache.revalidate_freq=1
\ No newline at end of file |