Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
26736ed57f | |||
d307aadf40 | |||
efc49cad69 | |||
4640dab8d2 | |||
fc4e33a9b9 | |||
a7341bac2c | |||
6568947669 | |||
4811e61883 | |||
0e4f178208 | |||
fd5df047d1 | |||
690e6fe639 | |||
b4767957f3 | |||
7e87ef3ea2 | |||
eadb3c5aaa | |||
53910bee43 |
12
.gitea/workflows/container.yaml
Normal file
12
.gitea/workflows/container.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
name: Build Multiarch Container Image
|
||||
on: [push]
|
||||
jobs:
|
||||
call-reusable-workflow:
|
||||
uses: container/multiarch-build-workflow/.gitea/workflows/build.yaml@main
|
||||
with:
|
||||
repository: ${{ gitea.repository }}
|
||||
ref_name: ${{ gitea.ref_name }}
|
||||
sha: ${{ gitea.sha }}
|
||||
registry_url: ${{ secrets.REGISTRY_URL }}
|
||||
registry_user: ${{ secrets.REGISTRY_USER }}
|
||||
registry_pw: ${{ secrets.REGISTRY_PW }}
|
@ -1,18 +0,0 @@
|
||||
variables:
|
||||
CONTAINER_NAME: thallian/roundcube
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- mkdir -p /kaniko/.docker
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
||||
- >-
|
||||
/kaniko/executor
|
||||
--context "$CI_PROJECT_DIR"
|
||||
--dockerfile "$CI_PROJECT_DIR/Dockerfile"
|
||||
--destination "$CONTAINER_NAME:$CI_COMMIT_SHA"
|
||||
--destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME"
|
||||
--destination "$CONTAINER_NAME:latest"
|
73
Containerfile
Normal file
73
Containerfile
Normal file
@ -0,0 +1,73 @@
|
||||
FROM docker.io/alpine:3.20 AS builder
|
||||
|
||||
RUN apk add --no-cache \
|
||||
php83 \
|
||||
php83-phar \
|
||||
php83-mbstring \
|
||||
php83-openssl \
|
||||
php83-ctype \
|
||||
php83-gd \
|
||||
php83-dom \
|
||||
php83-xml \
|
||||
php83-ldap \
|
||||
php83-xmlreader \
|
||||
php83-xmlwriter
|
||||
|
||||
ENV COMPOSER_VERSION=2.6.6
|
||||
ENV COMPOSER_SHA256_SUM=72600201c73c7c4b218f1c0511b36d8537963e36aafa244757f52309f885b314
|
||||
RUN wget https://getcomposer.org/download/$COMPOSER_VERSION/composer.phar -O /bin/composer
|
||||
RUN echo "$COMPOSER_SHA256_SUM /bin/composer" | sha256sum -c - || exit 1
|
||||
RUN chmod +x /bin/composer
|
||||
|
||||
ENV VERSION=1.6.7
|
||||
ENV SHA256_SUM=cf52515e65b2818cb02fd7a202c766367b8c54d8b7fea27dda9c81aa7ce1d3a6
|
||||
RUN wget https://github.com/roundcube/roundcubemail/releases/download/$VERSION/roundcubemail-$VERSION-complete.tar.gz
|
||||
RUN echo "$SHA256_SUM roundcubemail-$VERSION-complete.tar.gz" | sha256sum -c - || exit 1
|
||||
RUN mkdir -p /var/lib/roundcube
|
||||
RUN tar xzf roundcubemail-$VERSION-complete.tar.gz -C /var/lib/roundcube --strip 1
|
||||
|
||||
FROM docker.io/thallian/php8-fpm:3.20-8.3
|
||||
|
||||
RUN apk add --no-cache \
|
||||
openssl \
|
||||
tar \
|
||||
nginx \
|
||||
postgresql-client \
|
||||
aspell \
|
||||
ca-certificates \
|
||||
php83 \
|
||||
php83-imap \
|
||||
php83-dom \
|
||||
php83-json \
|
||||
php83-xml \
|
||||
php83-session \
|
||||
php83-pdo \
|
||||
php83-pdo_pgsql \
|
||||
php83-sockets \
|
||||
php83-exif \
|
||||
php83-iconv \
|
||||
php83-openssl \
|
||||
php83-mbstring \
|
||||
php83-sockets \
|
||||
php83-zip \
|
||||
php83-pspell \
|
||||
php83-pecl-apcu \
|
||||
php83-gd \
|
||||
php83-ctype \
|
||||
php83-xmlreader \
|
||||
php83-xmlwriter \
|
||||
php83-tokenizer \
|
||||
php83-curl \
|
||||
php83-simplexml \
|
||||
php83-xml \
|
||||
php83-dom \
|
||||
php83-intl
|
||||
|
||||
COPY --from=builder --chown=nginx:nginx /var/lib/roundcube /var/lib/roundcube
|
||||
|
||||
ADD /rootfs /
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENV FPMUSER nginx
|
||||
ENV FPMGROUP nginx
|
78
Dockerfile
78
Dockerfile
@ -1,78 +0,0 @@
|
||||
FROM docker.io/alpine:3.15 AS builder
|
||||
|
||||
RUN apk add --no-cache \
|
||||
php8 \
|
||||
php8-phar \
|
||||
php8-mbstring \
|
||||
php8-openssl \
|
||||
php8-ctype \
|
||||
php8-gd \
|
||||
php8-dom \
|
||||
php8-xml \
|
||||
php8-ldap \
|
||||
php8-xmlreader \
|
||||
php8-xmlwriter
|
||||
|
||||
RUN ln -s /usr/bin/php8 /usr/bin/php
|
||||
|
||||
ENV COMPOSER_VERSION=2.1.6
|
||||
ENV COMPOSER_SHA256_SUM=72524ccebcb071968eb83284507225fdba59f223719b2b3f333d76c8a9ac6b72
|
||||
RUN wget https://getcomposer.org/download/$COMPOSER_VERSION/composer.phar
|
||||
RUN echo "$COMPOSER_SHA256_SUM composer.phar" | sha256sum -c - || exit 1
|
||||
RUN mv composer.phar /usr/bin/composer
|
||||
RUN chmod +x /usr/bin/composer
|
||||
|
||||
ENV VERSION=1.5.3
|
||||
ENV SHA256_SUM=4bcfac219f2e0005c912dac3227743cc1ed0ded69c822f74c81a70d041e5a3bd
|
||||
RUN wget https://github.com/roundcube/roundcubemail/releases/download/$VERSION/roundcubemail-$VERSION-complete.tar.gz
|
||||
RUN echo "$SHA256_SUM roundcubemail-$VERSION-complete.tar.gz" | sha256sum -c - || exit 1
|
||||
RUN mkdir -p /var/lib/roundcube
|
||||
RUN tar xzf roundcubemail-$VERSION-complete.tar.gz -C /var/lib/roundcube --strip 1
|
||||
|
||||
FROM docker.io/thallian/php8-fpm:latest
|
||||
|
||||
|
||||
RUN apk add --no-cache \
|
||||
openssl \
|
||||
tar \
|
||||
nginx \
|
||||
postgresql-client \
|
||||
aspell \
|
||||
ca-certificates \
|
||||
php8 \
|
||||
php8-imap \
|
||||
php8-dom \
|
||||
php8-json \
|
||||
php8-xml \
|
||||
php8-session \
|
||||
php8-pdo \
|
||||
php8-pdo_pgsql \
|
||||
php8-sockets \
|
||||
php8-exif \
|
||||
php8-iconv \
|
||||
php8-openssl \
|
||||
php8-mbstring \
|
||||
php8-sockets \
|
||||
php8-pecl-mcrypt \
|
||||
php8-zip \
|
||||
php8-pspell \
|
||||
php8-pecl-apcu \
|
||||
php8-gd \
|
||||
php8-ctype \
|
||||
php8-xmlreader \
|
||||
php8-xmlwriter \
|
||||
php8-tokenizer \
|
||||
php8-curl \
|
||||
php8-simplexml \
|
||||
php8-xml \
|
||||
php8-dom \
|
||||
php8-intl
|
||||
|
||||
COPY --from=builder --chown=nginx:nginx /var/lib/roundcube /var/lib/roundcube
|
||||
|
||||
ADD /rootfs /
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENV FPMUSER nginx
|
||||
ENV FPMGROUP nginx
|
34
README.md
34
README.md
@ -1,73 +1,99 @@
|
||||
[Roundcube](https://roundcube.net/) webmail interface with postgres backend and oauth login.
|
||||
[Roundcube](https://roundcube.net/) webmail interface with postgres backend and
|
||||
oauth login.
|
||||
|
||||
# Environment Variables
|
||||
|
||||
## DOMAINS
|
||||
|
||||
Semicolon seperated list of domains to listen to.
|
||||
|
||||
## DB_USER
|
||||
|
||||
Name of the database user.
|
||||
|
||||
## DB_PASSWORD
|
||||
|
||||
Password for the database user.
|
||||
|
||||
## DB_HOST
|
||||
|
||||
Database host.
|
||||
|
||||
## DB_NAME
|
||||
|
||||
Database name.
|
||||
|
||||
## IMAP_HOST
|
||||
|
||||
- default: tls://%n
|
||||
|
||||
IMAP host to authenticate users against.
|
||||
|
||||
## SMTP_HOST
|
||||
|
||||
- default: tls://%n
|
||||
|
||||
SMTP host for sending mails.
|
||||
|
||||
## SMTP_PORT
|
||||
|
||||
- default: 587
|
||||
|
||||
Port for the SMTP host.
|
||||
|
||||
## SECRET_KEY
|
||||
|
||||
Secret key for session secrets.
|
||||
|
||||
## CIPHER_METHOD
|
||||
|
||||
- default: AES-256-CBC
|
||||
|
||||
Encryption algorithm for session secrets.
|
||||
|
||||
## OAUTH_PROVIDER_NAME
|
||||
|
||||
Name of the oauth provider on the roundcube login page.
|
||||
|
||||
## OAUTH_CLIENT_ID
|
||||
|
||||
Client id for oauth login.
|
||||
|
||||
## OAUTH_CLIENT_SECRET
|
||||
|
||||
Client secret for oauth login.
|
||||
|
||||
## OAUTH_AUTH_URI
|
||||
|
||||
Auth uri for oauth login.
|
||||
|
||||
Example for keycloak: `https://example.com/realms/master/protocol/openid-connect/auth`
|
||||
Example for keycloak:
|
||||
`https://example.com/realms/master/protocol/openid-connect/auth`
|
||||
|
||||
## OAUTH_TOKEN_URI
|
||||
|
||||
Token uri for oauth login.
|
||||
|
||||
Example for keycloak: `https://example.com/realms/master/protocol/openid-connect/token`
|
||||
Example for keycloak:
|
||||
`https://example.com/realms/master/protocol/openid-connect/token`
|
||||
|
||||
## OAUTH_IDENTITY_URI
|
||||
|
||||
Userinfo uri for oauth login.
|
||||
|
||||
Example for keycloak: `https://example.com/realms/master/protocol/openid-connect/userinfo`
|
||||
Example for keycloak:
|
||||
`https://example.com/realms/master/protocol/openid-connect/userinfo`
|
||||
|
||||
## MANAGESIEVE_HOST
|
||||
|
||||
Where to connect to managesieve.
|
||||
|
||||
# Ports
|
||||
|
||||
- 80
|
||||
|
||||
# Capabilities
|
||||
|
||||
- CHOWN
|
||||
- DAC_OVERRIDE
|
||||
- NET_BIND_SERVICE
|
||||
|
@ -7,7 +7,7 @@ $config['log_driver'] = 'stdout';
|
||||
|
||||
$config['skin'] = 'elastic';
|
||||
|
||||
$config['default_host'] = '{{getenv "IMAP_HOST" "tls://%n"}}';
|
||||
$config['imap_host'] = '{{getenv "IMAP_HOST" "tls://%n"}}';
|
||||
$config['imap_conn_options'] = array(
|
||||
'ssl' => array(
|
||||
'verify_peer' => true,
|
||||
@ -15,8 +15,9 @@ $config['imap_conn_options'] = array(
|
||||
),
|
||||
);
|
||||
|
||||
$config['smtp_server'] = '{{getenv "SMTP_HOST" "tls://%n"}}';
|
||||
$config['smtp_port'] = {{getenv "SMTP_PORT" "587"}};
|
||||
$config['request_path'] = 'SCRIPT_NAME';
|
||||
|
||||
$config['smtp_host'] = '{{getenv "SMTP_HOST" "tls://%n"}}:{{getenv "SMTP_PORT" "587"}}';
|
||||
$config['smtp_user'] = '%u';
|
||||
$config['smtp_pass'] = '%p';
|
||||
/*$config['smtp_conn_options'] = array(
|
||||
@ -51,3 +52,4 @@ $config['oauth_scope'] = 'email profile openid';
|
||||
$config['oauth_auth_parameters'] = [];
|
||||
$config['oauth_identity_fields'] = ['preferred_username'];
|
||||
$config['oauth_login_redirect'] = true;
|
||||
$config['managesieve_host'] = '{{getenv "MANAGESIEVE_HOST"}}';
|
||||
|
@ -22,6 +22,7 @@ http {
|
||||
{{range $domain := split (getenv "DOMAINS") ";"}}
|
||||
|
||||
server {
|
||||
listen [::]:8080;
|
||||
listen 8080;
|
||||
|
||||
server_name {{ $domain }};
|
||||
|
Loading…
Reference in New Issue
Block a user