Add vapid keys configuration

This commit is contained in:
Nick Sellen 2024-01-17 18:41:14 +00:00
parent cc61f80953
commit 7f8d9c0843
Signed by: nicksellen
GPG Key ID: 7C3A275C0DC2EFA1
3 changed files with 16 additions and 1 deletions

View File

@ -5,6 +5,7 @@ DOMAIN=karrot.example.com
SECRET_DB_PASSWORD_VERSION=v1
SECRET_SECRET_KEY_VERSION=v1
SECRET_SMTP_PASSWORD_VERSION=v1
SECRET_VAPID_SECRET_KEY_VERSION=v1
# account id for maxmind (for GeoIP)
#MAXMIND_ACCOUNT_ID=
@ -15,6 +16,10 @@ SITE_LOGO=https://user-images.githubusercontent.com/31616/36565633-517373a4-1821
FILE_UPLOAD_MAX_SIZE=10m
# For web push set this, and the vapid private key secret
# You need to generate a valid vapid keypair
#VAPID_PUBLIC_KEY=
# postal,smtp,console
EMAIL_BACKEND=console

View File

@ -52,6 +52,7 @@ services:
- secret_key
- maxmind_license_key
- smtp_password
- vapid_secret_key
volumes:
- "shiv_data:/root/.shiv"
- "geoip_data:/var/lib/GeoIP"
@ -92,6 +93,8 @@ services:
- SMTP_USE_SSL
- SMTP_USE_TLS
- SMTP_USER
- VAPID_PUBLIC_KEY
- VAPID_SECRET_KEY_FILE=/run/secrets/vapid_secret_key
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/config/"]
interval: 10s
@ -122,6 +125,7 @@ services:
- db_password
- secret_key
- smtp_password
- vapid_secret_key
environment:
- DATABASE_CONN_MAX_AGE
- DATABASE_HOST=db
@ -152,7 +156,9 @@ services:
- SMTP_USE_SSL
- SMTP_USE_TLS
- SMTP_USER
- VAPID_PUBLIC_KEY
- VAPID_SECRET_KEY_FILE=/run/secrets/vapid_secret_key
redis:
image: "redis:6-alpine"
command: ["redis-server", "--appendonly", "yes"]
@ -211,6 +217,9 @@ secrets:
smtp_password:
external: true
name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}
vapid_secret_key:
external: true
name: ${STACK_NAME}_vapid_secret_key_${SECRET_VAPID_SECRET_KEY_VERSION}
volumes:
shiv_data:

View File

@ -27,5 +27,6 @@ file_env() {
file_env DATABASE_PASSWORD
file_env SECRET_KEY
file_env SMTP_PASSWORD
file_env VAPID_SECRET_KEY
/docker-entrypoint.sh