SMTP config, initial README

This commit is contained in:
3wc 2021-07-25 14:45:30 +02:00
parent e3c7b09c22
commit d7c8c474dc
3 changed files with 59 additions and 15 deletions

View File

@ -1,16 +1,16 @@
# discourse
# Discourse
${REPO_DESCRIPTION}
A platform for community discussion
<!-- metadata -->
* **Category**:
* **Category**: Apps
* **Status**:
* **Image**: [`discourse`](https://hub.docker.com/r/discourse/discourse)
* **Healthcheck**:
* **Backups**:
* **Email**:
* **Tests**:
* **SSO**:
* **Image**: [`bitnami/discourse`](https://hub.docker.com/r/bitname/discourse)
* **Healthcheck**: yes
* **Backups**: no
* **Email**: yes
* **Tests**: no
* **SSO**: no
<!-- endmetadata -->
## Basic usage

20
compose.smtpauth.yml Normal file
View File

@ -0,0 +1,20 @@
---
version: "3.8"
services:
app:
environment:
- DISCOURSE_SMTP_PASSWORD_FILE=/var/run/secrets/smtp_password
secrets:
- smtp_password
sidekiq:
environment:
- DISCOURSE_SMTP_PASSWORD_FILE=/var/run/secrets/smtp_password
secrets:
- smtp_password
secrets:
smtp_password:
external: true
name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}

View File

@ -14,10 +14,18 @@ services:
- DISCOURSE_DATABASE_HOST=db
- DISCOURSE_DATABASE_USER=discourse
- DISCOURSE_DATABASE_NAME=discourse
- DISCOURSE_DATABASE_PASSWORD_FILE=/run/secrets/db_password
- DISCOURSE_REDIS_HOST=redis
- DISCOURSE_REDIS_PORT_NUMBER=6379
- DISCOURSE_SMTP_HOST
- DISCOURSE_SMTP_PORT
- DISCOURSE_SMTP_USER
- DISCOURSE_SMTP_PROTOCOL
- DISCOURSE_SMTP_AUTH
volumes:
- 'discourse_data:/bitnami/discourse'
secrets:
- db_password
depends_on:
- db
- redis
@ -34,23 +42,26 @@ services:
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
db:
image: postgres:11-alpine
networks:
- internal
secrets:
- db_password
volumes:
- 'postgresql_data:/var/lib/postgresql/data'
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_USER=discourse
- POSTGRES_DB=discourse
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
redis:
image: redis:6.0-alpine
@ -68,6 +79,8 @@ services:
volumes:
- 'sidekiq_data:/bitnami/discourse'
command: /opt/bitnami/scripts/discourse-sidekiq/run.sh
secrets:
- db_password
environment:
- ALLOW_EMPTY_PASSWORD=yes
- DISCOURSE_HOST=${DOMAIN}
@ -77,6 +90,17 @@ services:
- DISCOURSE_DATABASE_NAME=discourse
- DISCOURSE_REDIS_HOST=redis
- DISCOURSE_REDIS_PORT_NUMBER=6379
- DISCOURSE_DATABASE_PASSWORD_FILE=/run/secrets/db_password
- DISCOURSE_SMTP_HOST
- DISCOURSE_SMTP_PORT
- DISCOURSE_SMTP_USER
- DISCOURSE_SMTP_PROTOCOL
- DISCOURSE_SMTP_AUTH
secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
volumes:
postgresql_data: