Compare commits

...

15 Commits

Author SHA1 Message Date
Stanislav Nikitin 3156d3d007
Fix building process.
continuous-integration/drone/push Build is passing Details
2022-06-29 18:23:40 +05:00
Stanislav Nikitin 226f78b89a
Fix building process.
continuous-integration/drone/push Build is failing Details
2022-06-29 18:21:09 +05:00
Stanislav Nikitin 57c6a8131c
Update to PHP 8.
continuous-integration/drone/push Build is failing Details
2022-06-29 18:15:16 +05:00
Stanislav Nikitin 4320c5f837
Fix alpine image version tag.
continuous-integration/drone/push Build is failing Details
2022-06-29 18:14:25 +05:00
Stanislav Nikitin 2b5cf83204
Switch to mirrorred images for Drone and Docker.
continuous-integration/drone/push Build is failing Details
2022-06-29 18:12:29 +05:00
Stanislav Nikitin fc9ea47825
Add docker-compose example to README. 2021-11-19 11:50:06 +05:00
Stanislav Nikitin 948bc2c76e
Drone fixes. 2021-11-19 11:40:30 +05:00
Stanislav Nikitin 5da628da37
Update to 1.16.0. 2021-07-08 16:26:40 +05:00
Stanislav Nikitin 8ccca639a3
Gitlab CI config update. 2020-11-20 19:00:21 +05:00
Stanislav Nikitin c27efd5fc8
Gitlab CI. 2020-09-28 03:33:58 +05:00
Stanislav Nikitin 71a429dcf5
Drone discord messages fix. 2020-06-20 21:12:31 +05:00
Stanislav Nikitin a43ec2db9f
Updated rainloop to 1.14.0. 2020-06-20 21:09:03 +05:00
Stanislav Nikitin c01876e1b2
Fix nginx configuration to not cache requests bodys. 2020-06-16 12:07:59 +05:00
Stanislav Nikitin 1bd9ecc5fe
Changed max_input_vars in php.ini to 100000 to avoid errors when using complex sieve scripts. 2019-12-23 00:44:52 +05:00
Stanislav Nikitin 5e8dc4bec3
Added information about chmod when using directory binding. 2019-12-22 23:27:12 +05:00
6 changed files with 110 additions and 51 deletions

View File

@ -4,39 +4,12 @@ type: docker
name: build
steps:
- name: notify-start
image: pztrn/discordrone
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_secret
message: 'Starting building **{{repo.name}}#{{build.number}}@{{build.commit}}** @ {{datetime build.started "02-Jan-2006 15:04:05 MST" "Asia/Yekaterinburg"}} (See {{build.link}} for logs).'
- name: docker
image: plugins/docker
image: code.pztrn.name/containers/mirror/plugins/docker:20.13.0
settings:
username:
from_secret: dockerhub_user
registry: code.pztrn.name
username: drone
password:
from_secret: dockerhub_password
repo: pztrn/rainloop
from_secret: drone_secret
repo: code.pztrn.name/containers/rainloop
auto_tag: true
- name: notify-end
when:
status:
- success
- failure
image: pztrn/discordrone
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_secret
message: "
{{#success build.status}}
**{{repo.name}}#{{build.number}}@{{build.commit}}** deployed.
{{ else }}
**{{repo.name}}#{{build.number}}@{{build.commit}}** failed. See {{build.link}}.
{{/success}}"

61
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,61 @@
image: docker:19.03.13
services:
- docker:19.03.13-dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_TCP_PORT: 2375
DOCKER_TLS_CERTDIR: ""
LOCAL_REGISTRY_IMAGE_LATEST: $CI_REGISTRY_IMAGE:latest
LOCAL_REGISTRY_IMAGE_TAGGED: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
DOCKERHUB_IMAGE_LATEST: pztrn/rainloop:latest
DOCKERHUB_IMAGE_TAGGED: pztrn/rainloop:$CI_COMMIT_TAG
stages:
- build
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_PASSWORD"
- docker info
build-local-registry-latest:
stage: build
tags:
- docker
script:
- docker build --pull -t $LOCAL_REGISTRY_IMAGE_LATEST .
- docker push $LOCAL_REGISTRY_IMAGE_LATEST
only:
- master
build-local-registry-version:
stage: build
tags:
- docker
script:
- docker build --pull -t $LOCAL_REGISTRY_IMAGE_TAGGED .
- docker push $LOCAL_REGISTRY_IMAGE_TAGGED
only:
- tags
build-dockerhub-latest:
stage: build
tags:
- docker
script:
- docker build --pull -t $DOCKERHUB_IMAGE_LATEST .
- docker push $DOCKERHUB_IMAGE_LATEST
only:
- master
build-dockerhub-version:
stage: build
tags:
- docker
script:
- docker build --pull -t $DOCKERHUB_IMAGE_TAGGED .
- docker push $DOCKERHUB_IMAGE_TAGGED
only:
- tags

View File

@ -1,31 +1,28 @@
FROM alpine:3.11
FROM code.pztrn.name/containers/mirror/alpine:3.16.0
# Install necessary things
RUN apk add --no-cache \
git \
nginx \
php7-curl \
php7-dom \
php7-fpm \
php7-iconv \
php7-json \
php7-openssl \
php7-pdo_mysql \
php7-pdo_pgsql \
php7-pdo_sqlite \
php7-xml \
php8-curl \
php8-dom \
php8-fpm \
php8-iconv \
php8-json \
php8-openssl \
php8-pdo_mysql \
php8-pdo_pgsql \
php8-pdo_sqlite \
php8-xml \
s6 \
unzip \
wget && \
rm /etc/nginx/conf.d/default.conf && \
rm /etc/php7/php-fpm.d/www.conf && \
mkdir /var/run/nginx && \
chown -R nginx:nginx /var/run/nginx
rm /etc/php8/php-fpm.d/www.conf
# Get rainloop.
RUN mkdir -p /var/www/rainloop && \
cd /var/www/rainloop && \
wget https://github.com/RainLoop/rainloop-webmail/releases/download/v1.13.0/rainloop-community-1.13.0.zip && \
wget https://github.com/RainLoop/rainloop-webmail/releases/download/v1.16.0/rainloop-community-1.16.0.zip && \
ls -la && \
unzip rainloop-community-*.zip && \
chown -R nginx:nginx /var/www/rainloop && \
@ -42,4 +39,4 @@ EXPOSE 80
VOLUME [ "/var/www/rainloop/data" ]
ENTRYPOINT ["/bin/s6-svscan", "/etc/s6"]
ENTRYPOINT ["/bin/s6-svscan", "/etc/s6"]

View File

@ -4,4 +4,30 @@ This repository contains Rainloop webmail Docker container build scripts and nec
## Persistent things
There are some things that should be preserved between container's restarts. Please, add new volume for ``/var/www/rainloop/data`` directory.
There are some things that should be preserved between container's restarts. Please, add new volume for ``/var/www/rainloop/data`` directory.
If you're binding directory except of creating volume please do proper ``chown``:
```shell
chown -R 100:101 /dir/with/data
```
## Use with docker-compose
You may use this image with docker-compose like that:
```yaml
version: "2.4"
services:
rainloop:
restart: always
image: "pztrn/rainloop:1.16.0"
volumes:
- "/root/rainloop/data:/var/www/rainloop/data"
ports:
- "5480:80"
cpus: 2
mem_limit: 1G
memswap_limit: 0
```

View File

@ -9,6 +9,8 @@ server {
autoindex on;
charset utf-8;
client_max_body_size 500m;
# To not cache requests bodys on disk.
client_body_buffer_size 16m;
gzip on;

View File

@ -394,7 +394,7 @@ max_input_time = 60
;max_input_nesting_level = 64
; How many GET/POST/COOKIE input variables may be accepted
;max_input_vars = 1000
max_input_vars = 100000
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit