[RC] Add testing

This commit is contained in:
thopic 2021-07-20 17:05:55 +02:00
parent 34e04859a2
commit 9086875add
Signed by: thopic
GPG Key ID: 292DBBF0B54AD4C5
5 changed files with 77 additions and 0 deletions

View File

@ -0,0 +1,3 @@
DATA_PATH=
CN=
MAIL_SERVER=

View File

@ -0,0 +1,22 @@
FROM roundcube/roundcubemail:1.4.11-apache
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
; \
\
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer; \
mv /usr/src/roundcubemail/composer.json-dist /usr/src/roundcubemail/composer.json; \
\
composer \
--working-dir=/usr/src/roundcubemail/ \
--prefer-dist --no-dev \
--no-interaction \
--optimize-autoloader --apcu-autoloader \
update;
RUN mkdir -p /etc/enigma/gnupg \
&& chown www-data:www-data /etc/enigma/gnupg \
&& cp /usr/src/roundcubemail/plugins/enigma/config.inc.php.dist /usr/src/roundcubemail/plugins/enigma/config.inc.php \
&& echo "\$config['enigma_pgp_homedir'] = '/etc/enigma/gnupg';" >> /usr/src/roundcubemail/plugins/enigma/config.inc.php

View File

@ -0,0 +1,43 @@
version: "3.8"
services:
app:
build: .
image: rc_test:latest
restart: unless-stopped
depends_on:
- db
volumes:
- ${DATA_PATH}/app:/var/www/html
- ${DATA_PATH}/enigma:/etc/enigma/gnupg
env_file: secrets/app.secrets
environment:
- ROUNDCUBEMAIL_SKIN=elastic
- ROUNDCUBEMAIL_DEFAULT_HOST=tls://${MAIL_SERVER}
- ROUNDCUBEMAIL_SMTP_SERVER=tls://${MAIL_SERVER}
- ROUNDCUBEMAIL_PLUGINS=archive, zipdownload, enigma, carddav
networks:
- default
- proxy
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.middlewares.rctest-redirect-websecure.redirectscheme.scheme=https"
- "traefik.http.routers.rctest-http.middlewares=rctest-redirect-websecure"
- "traefik.http.routers.rctest-http.rule=Host(`${CN}`)"
- "traefik.http.routers.rctest-http.entrypoints=web"
- "traefik.http.routers.rctest-https.rule=Host(`${CN}`)"
- "traefik.http.routers.rctest-https.entrypoints=websecure"
- "traefik.http.routers.rctest-https.tls=true"
- "traefik.http.routers.rctest-https.tls.certresolver=myhttpchallenge"
db:
image: mariadb:10.5
restart: unless-stopped
volumes:
- ${DATA_PATH}/db:/var/lib/mysql
env_file: secrets/db.secrets
networks:
proxy:
external: true

View File

@ -0,0 +1,5 @@
ROUNDCUBEMAIL_DB_TYPE=
ROUNDCUBEMAIL_DB_NAME=
ROUNDCUBEMAIL_DB_HOST=
ROUNDCUBEMAIL_DB_USER=
ROUNDCUBEMAIL_DB_PASSWORD=

View File

@ -0,0 +1,4 @@
MYSQL_ROOT_PASSWORD=
MYSQL_PASSWORD=
MYSQL_DATABASE=
MYSQL_USER=