Here is mine, beware that I have a lot of custom settings, so it may not work out of the box for you.
This is my app.yml
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
expose:
- "127.0.0.1:3030:80"
docker_args:
- "--network=name-of-your-docker-network"
- "--sysctl net.core.somaxconn=4096"
params:
db_default_text_search_config: "pg_catalog.english"
db_work_mem: "40MB"
env:
LANG: en_US.UTF-8
VIRTUAL_HOST: redacted.app,www.redacted.app,redacted.com.br,www.redacted.com.br
VIRTUAL_PORT: 80
LETSENCRYPT_HOST: redacted.app,www.redacted.app,redacted.com.br,www.redacted.com.br
LETSENCRYPT_EMAIL: email@email.com
DISCOURSE_HOSTNAME: redacted.app
DISCOURSE_DEVELOPER_EMAILS: 'email@email.com'
DISCOURSE_SMTP_ADDRESS: smtp.sendgrid.net
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: apikey
DISCOURSE_SMTP_PASSWORD: "password"
DISCOURSE_SMTP_ENABLE_START_TLS: true
SSL_POLICY: Mozilla-Modern
volumes:
- volume:
host: /opt/discourse/data
guest: /shared
- volume:
host: /opt/discourse/data/log
guest: /var/log
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/discourse/discourse-sitemap.git
- git clone https://github.com/discourse/discourse-solved.git
- git clone https://github.com/angusmcleod/discourse-locations.git
- git clone https://github.com/angusmcleod/discourse-events.git
after_web_config:
- replace:
filename: /etc/nginx/nginx.conf
from: /sendfile.+on;/
to: |
server_names_hash_bucket_size 64;
sendfile on;
- file:
path: /etc/nginx/conf.d/discourse_redirect_1.conf
contents: |
server {
server_name www.redacted.app www.redacted.com.br redacted.com.br;
return 301 https://redacted.app$request_uri;
}
run:
- replace:
filename: /etc/nginx/conf.d/discourse.conf
from: "types {"
to: |
set_real_ip_from 172.18.0.0/24;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
types {
Do not copy and paste. You have to change some stuff, this also assumes you are using sendgrid. You need to replace the domains, email, sendgrid apikey password.
Good luck.