initial commit

This commit is contained in:
quackerd 2021-02-17 00:32:26 -05:00
parent a5176ae85c
commit 2d27aa720e
Signed by: d
GPG Key ID: F73412644EDE357A
4 changed files with 90 additions and 0 deletions

24
.drone.yml Normal file
View File

@ -0,0 +1,24 @@
kind: pipeline
type: docker
name: Docker image build
trigger:
branch:
- master
environment:
VERSION: 1.15.0
steps:
- name: config
image: alpine
commands:
- echo -n "$VERSION,latest" > .tags
- name: build
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: quackerd/rainloop

31
Dockerfile Normal file
View File

@ -0,0 +1,31 @@
FROM debian:buster
ENV RAINLOOP_DIR=/var/www/rainloop
WORKDIR /opt
COPY ./run.sh /opt/run.sh
RUN set -xe && \
apt update -y && \
apt upgrade -y && \
apt install -y unzip curl wget php php-curl php-json php-dom php-fpm php-pgsql php-sqlite3 php-mysql nginx && \
mkdir -p ${RAINLOOP_DIR} && \
wget https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip && \
unzip rainloop-community-latest.zip -d ${RAINLOOP_DIR} && \
rm rainloop-community-latest.zip && \
mkdir -p /logs && \
sed -i 's/error_log =.*/error_log = \/logs\/php_fpm.log/g' /etc/php/7.3/fpm/php-fpm.conf && \
sed -i 's/upload_max_filesize =.*/upload_max_filesize = 100M/g' /etc/php/7.3/fpm/php.ini && \
sed -i 's/post_max_size =.*/post_max_size = 100M/g' /etc/php/7.3/fpm/php.ini && \
chown -R www-data:www-data ${RAINLOOP_DIR} && \
chmod +x /opt/run.sh && \
apt purge -y --autoremove unzip curl wget && \
apt clean
COPY ./default /etc/nginx/sites-enabled/default
VOLUME ["${RAINLOOP_DIR}/data"]
EXPOSE 80
CMD ["/opt/run.sh"]

31
default Normal file
View File

@ -0,0 +1,31 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/rainloop;
access_log /dev/stdout;
error_log /dev/stderr;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_keep_conn on;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
location ^~ /data {
deny all;
}
}

4
run.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
set -xe
service php7.3-fpm start
exec nginx -g "daemon off;"