You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.3 KiB
68 lines
2.3 KiB
---
|
|
|
|
templates:
|
|
- "templates/web.template.yml"
|
|
- "templates/web.ratelimited.template.yml"
|
|
|
|
expose:
|
|
- "{{ env.APP_PORT }}:80"
|
|
|
|
params:
|
|
## Which Git revision should this container use? (default: tests-passed)
|
|
#version: tests-passed
|
|
version: latest-release #FIXME: does it work?
|
|
|
|
env:
|
|
DISCOURSE_HOSTNAME: '{{ env.APP_FQDN }}'
|
|
|
|
LC_ALL: en_US.UTF-8
|
|
LANG: en_US.UTF-8
|
|
LANGUAGE: en_US.UTF-8
|
|
# DISCOURSE_DEFAULT_LOCALE: en
|
|
|
|
## Uncomment if you want the container to be started with the same
|
|
## hostname (-h option) as specified above (default "$hostname-$config")
|
|
DOCKER_USE_HOSTNAME: true
|
|
|
|
DISCOURSE_SMTP_ADDRESS: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.discourse.smtp.server }}
|
|
DISCOURSE_SMTP_PORT: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.discourse.smtp.port }}
|
|
DISCOURSE_SMTP_USER_NAME: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.discourse.smtp.username }}
|
|
DISCOURSE_SMTP_PASSWORD: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.discourse.smtp.password }}
|
|
|
|
DISCOURSE_DEVELOPER_EMAILS: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.discourse.admin }}
|
|
DISCOURSE_NOTIFICATION_EMAIL: noreply@{{ env.APP_DOMAIN }}
|
|
|
|
DISCOURSE_DB_NAME: {{ env.APP_NAME }}
|
|
DISCOURSE_DB_USERNAME: {{ env.APP_NAME }}
|
|
DISCOURSE_DB_PASSWORD: {{ env.APP_NAME }}
|
|
DISCOURSE_DB_HOST: ct1.lxd
|
|
|
|
DISCOURSE_REDIS_HOST: ct1.lxd
|
|
|
|
volumes:
|
|
- volume:
|
|
host: /var/discourse/shared/web-only
|
|
guest: /shared
|
|
- volume:
|
|
host: /var/discourse/shared/web-only/log/var-log
|
|
guest: /var/log
|
|
|
|
## Plugins go here
|
|
## see https://meta.discourse.org/t/19157 for details
|
|
hooks:
|
|
after_code:
|
|
- exec:
|
|
cd: $home/plugins
|
|
cmd:
|
|
- git clone https://github.com/discourse/docker_manager.git
|
|
{%- if services[env.APP_DOMAIN][env.APP_SUBDOMAIN]['data']['discourse']['plugins'] %}
|
|
{%- for plugin in services[env.APP_DOMAIN][env.APP_SUBDOMAIN]['data']['discourse']['plugins'] %}
|
|
- git clone {{ plugin }}
|
|
{%- endfor %}
|
|
{%- endif %}
|
|
|
|
## Remember, this is YAML syntax - you can only have one block with a name
|
|
run:
|
|
- exec: echo "Beginning of custom commands"
|
|
- exec: echo "End of custom commands"
|
|
- exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'
|