diff options
author | crupest <crupest@outlook.com> | 2024-11-04 22:42:15 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2024-11-04 22:42:15 +0800 |
commit | d9b14f2ab051ad583e820975f2fe4f8bea19245f (patch) | |
tree | f9e97dd95efc0ed4aed14938202e1d4a85445c2f /template | |
parent | 3acef776a08a7314bc5bd3888ea3068dcc83837c (diff) | |
download | crupest-d9b14f2ab051ad583e820975f2fe4f8bea19245f.tar.gz crupest-d9b14f2ab051ad583e820975f2fe4f8bea19245f.tar.bz2 crupest-d9b14f2ab051ad583e820975f2fe4f8bea19245f.zip |
feat(service): add 2fauth.
Diffstat (limited to 'template')
-rw-r--r-- | template/docker-compose.yaml.template | 23 | ||||
-rw-r--r-- | template/nginx/server.json | 5 |
2 files changed, 28 insertions, 0 deletions
diff --git a/template/docker-compose.yaml.template b/template/docker-compose.yaml.template index f64543b..d2ddfbd 100644 --- a/template/docker-compose.yaml.template +++ b/template/docker-compose.yaml.template @@ -191,6 +191,29 @@ services: - ROUNDCUBEMAIL_SMTP_PORT=465 - ROUNDCUBEMAIL_DB_TYPE=sqlite + 2fauth: + image: 2fauth/2fauth + container_name: 2fauth + volumes: + - ./data/2fauth/work-dir:/2fauth + - ./data/2fauth/database:/srv/database + environment: + - APP_NAME=2FAuth-crupest + - APP_TIMEZONE=UTC + - SITE_OWNER=crupest@crupest.life + - APP_KEY=${CRUPEST_2FAUTH_APP_KEY} + - APP_URL=https://2fa.${CRUPEST_DOMAIN} + - DB_DATABASE="/srv/database/database.sqlite" + - MAIL_MAILER=smtp + - MAIL_HOST=smtp.crupest.life + - MAIL_PORT=465 + - MAIL_USERNAME=${CRUPEST_2FAUTH_MAIL_USERNAME} + - MAIL_PASSWORD=${CRUPEST_2FAUTH_MAIL_PASSWORD} + - MAIL_ENCRYPTION=ssl + - MAIL_FROM_NAME=2FAuth-crupest + - MAIL_FROM_ADDRESS=${CRUPEST_2FAUTH_MAIL_USERNAME} + - TRUSTED_PROXIES=* + volumes: blog-public: debian-dev-home: diff --git a/template/nginx/server.json b/template/nginx/server.json index b2655e2..5edf168 100644 --- a/template/nginx/server.json +++ b/template/nginx/server.json @@ -22,6 +22,11 @@ "upstream": "roundcubemail:80" }, { + "type": "reverse-proxy", + "subdomain": "2fa", + "upstream": "2fauth:8000" + }, + { "type": "static-file", "subdomain": "blog", "root": "/srv/blog" |