diff options
-rw-r--r-- | crupest-words.txt | 1 | ||||
-rw-r--r-- | template/docker-compose.yaml.template | 21 | ||||
-rw-r--r-- | template/nginx/root.conf.template | 36 | ||||
-rw-r--r-- | template/nginx/server.json | 4 |
4 files changed, 58 insertions, 4 deletions
diff --git a/crupest-words.txt b/crupest-words.txt index f62a5e9..fef2115 100644 --- a/crupest-words.txt +++ b/crupest-words.txt @@ -2,6 +2,7 @@ crupest # software forgejo +sypht # secret vnext diff --git a/template/docker-compose.yaml.template b/template/docker-compose.yaml.template index 48921bb..6dbc2b9 100644 --- a/template/docker-compose.yaml.template +++ b/template/docker-compose.yaml.template @@ -42,6 +42,7 @@ services: - "./data/certbot/certs:/etc/letsencrypt:ro" - "./data/certbot/webroot:/srv/acme:ro" - "blog-public:/srv/blog:ro" + - "roundcubemail-www:/srv/roundcubemail:ro" crupest-api: pull_policy: build @@ -176,6 +177,26 @@ services: - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + roundcubemail: + image: roundcube/roundcubemail:latest + container_name: roundcubemail + restart: on-failure:3 + volumes: + - roundcubemail-www:/var/www/html + - ./data/roundcube/config:/var/roundcube/config + - ./data/roundcube/db:/var/roundcube/db + - rountcubemail-temp:/tmp/roundcube-temp + ports: + - 9002:80 + environment: + - ROUNDCUBEMAIL_DEFAULT_HOST=ssl://mail.crupest.life + - ROUNDCUBEMAIL_DEFAULT_PORT=993 + - ROUNDCUBEMAIL_SMTP_SERVER=ssl://mail.crupest.life + - ROUNDCUBEMAIL_SMTP_PORT=465 + - ROUNDCUBEMAIL_DB_TYPE=sqlite + volumes: blog-public: debian-dev-home: + roundcubemail-www: + rountcubemail-temp:
\ No newline at end of file diff --git a/template/nginx/root.conf.template b/template/nginx/root.conf.template index 8f65b40..1a32b6d 100644 --- a/template/nginx/root.conf.template +++ b/template/nginx/root.conf.template @@ -49,3 +49,39 @@ server { root /srv/acme; } } + +# Temporary config for roundcubemail (PHP) +# TODO: Add to nginx template. + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name mail.${CRUPEST_DOMAIN}; + + index index.php index.html; + root /srv/roundcubemail; + + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass roundcubemail:9009; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + } +} + +server { + listen 80; + listen [::]:80; + server_name mail.${CRUPEST_DOMAIN}; + + location / { + return 301 https://$host$request_uri; + } + + location /.well-known/acme-challenge { + root /srv/acme; + } +} diff --git a/template/nginx/server.json b/template/nginx/server.json index c9a6108..a338c4f 100644 --- a/template/nginx/server.json +++ b/template/nginx/server.json @@ -25,10 +25,6 @@ "type": "redirect", "subdomain": "github", "url": "https://github.com/crupest" - }, - { - "type": "cert-only", - "subdomain": "mail" } ] } |