discourse
Note
we do custom config from beginning so ./discourse-setup
will not be used at all
fetch files
Warning
have to be installed as root. change to root with sudo -i
Note
dir is different than default
git clone https://github.com/discourse/discourse_docker.git /srv/discourse
cd /srv/docker/discourse
chmod 700 containers
configuration
Note
we use two templates. one for discourse itself and one for backend
discourse.yml
start with template and change name too
remove port for caddy so discourse is not doing reverse proxing
change network to caddy
docker_args:
- '--network caddynet'
- '--network internal-discoursenet'
networks:
caddynet:
external: true
internal-discoursenet:
external: true
add smtp
DISCOURSE_DEVELOPER_EMAILS: 'mail@domain.tld'
DISCOURSE_SMTP_ADDRESS: <smtp>
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: <mail@domain.tld>
DISCOURSE_SMTP_PASSWORD: <pw>
DISCOURSE_SMTP_ENABLE_START_TLS: true
troubleshoot smtp
if app.yml and web_only.yml are renamed, edit lines in `./discourse-doctor to be able to run diagnostic script
+ `if [ -f containers/discourse.yml ]`
+ ` app_name="discourse"`
+ ` elif [ -f containers/discourse-backend.yml ]`
+`log "YML=discourse-backend.yml"`
+` app_name="discourse-backend"`
+` web_file=containers/$app_name.yml`
get_yml_file() {
app_name=""
if [ -f containers/discourse.yml ]
then
app_name="discourse"
web_file=containers/$app_name.yml
log "Found $web_file"
elif [ -f containers/discourse-backend.yml ]
then
log "YML=discourse-backend.yml"
app_name="discourse-backend"
web_file=containers/$app_name.yml
log "Found $web_file"
else
log "Can't find app.yml or web_only.yml."
log "Giving up."
exit
fi
}
storage
Tip
i like to have things called by their name not only just a generic name
volumes:
- volume:
host: /srv/docker/discourse/shared/standalone
guest: /shared
- volume:
host: /srv/dock/discourse/shared/standalone/log/var-log
guest: /var/log
discourse-backend.yml
start with template and change name too
change network to internal
Note
create docker network with internal flag for backend docker network create --internal internal-discoursenet
install
Warning
default ./launcher rebuild app
is changed bc name of app.yml has changed to discourse.yml otherwise it would be ./launcher rebuild app
start install with custom config
start with backend and wait till its up so database is ready. check logs that database is ready for connection.
than start discourse itselfupdate
pull newest image
first stop both containers
start with backend till its ready up
then start discourseupdate env variables
after changes to discourse.yml or discourse-backend.yml, detroy & start again
wait till backend is ready uplogs
Tip
meanwhile i use dozzle for logs which is really handy
source
https://meta.discourse.org/t/change-discourse-install-storage-location/88256?silent=true
https://meta.discourse.org/t/integrating-discourse-caddy-and-wordpress-with-docker-ports-for-reverse-proxy/337656
https://caddy.community/t/discourse-with-caddy-v2-in-docker/9244