| 1 | # IMPORTANT: SET A SECRET PASSWORD in Postgres for the Discourse User |
| 2 | # TODO: change SOME_SECRET in this template |
| 3 | |
| 4 | templates: |
| 5 | - "templates/web.template.yml" |
| 6 | - "templates/web.ratelimited.template.yml" |
| 7 | |
| 8 | expose: |
| 9 | - "80:80" |
| 10 | - "2222:22" |
| 11 | |
| 12 | # Use 'links' key to link containers together, aka use Docker --link flag. |
| 13 | links: |
| 14 | - link: |
| 15 | name: data |
| 16 | alias: data |
| 17 | |
| 18 | # any extra arguments for Docker? |
| 19 | # docker_args: |
| 20 | |
| 21 | params: |
| 22 | ## Which Git revision should this container use? (default: tests-passed) |
| 23 | #version: tests-passed |
| 24 | |
| 25 | env: |
| 26 | LANG: en_US.UTF-8 |
| 27 | ## TODO: How many concurrent web requests are supported? |
| 28 | ## With 2GB we recommend 3-4 workers, with 1GB only 2 |
| 29 | ## If you have lots of memory, use one or two workers per logical CPU core |
| 30 | #UNICORN_WORKERS: 3 |
| 31 | |
| 32 | ## TODO: configure connectivity to the databases |
| 33 | DISCOURSE_DB_SOCKET: '' |
| 34 | #DISCOURSE_DB_USERNAME: discourse |
| 35 | DISCOURSE_DB_PASSWORD: SOME_SECRET |
| 36 | DISCOURSE_DB_HOST: data |
| 37 | DISCOURSE_REDIS_HOST: data |
| 38 | ## |
| 39 | ## TODO: List of comma delimited emails that will be made admin and developer |
| 40 | ## on initial signup example 'user1@example.com,user2@example.com' |
| 41 | DISCOURSE_DEVELOPER_EMAILS: 'me@example.com' |
| 42 | ## |
| 43 | ## TODO: The domain name this Discourse instance will respond to |
| 44 | DISCOURSE_HOSTNAME: 'discourse.example.com' |
| 45 | ## |
| 46 | ## TODO: The mailserver this Discourse instance will use |
| 47 | DISCOURSE_SMTP_ADDRESS: smtp.example.com # (mandatory) |
| 48 | #DISCOURSE_SMTP_PORT: 587 # (optional) |
| 49 | #DISCOURSE_SMTP_USER_NAME: user@example.com # (optional) |
| 50 | #DISCOURSE_SMTP_PASSWORD: pa$$word # (optional) |
| 51 | ## |
| 52 | ## The CDN address for this Discourse instance (configured to pull) |
| 53 | #DISCOURSE_CDN_URL: //discourse-cdn.example.com |
| 54 | |
| 55 | volumes: |
| 56 | - volume: |
| 57 | host: /var/discourse/shared/web-only |
| 58 | guest: /shared |
| 59 | - volume: |
| 60 | host: /var/discourse/shared/web-only/log/var-log |
| 61 | guest: /var/log |
| 62 | |
| 63 | ## The docker manager plugin allows you to one-click upgrade Discouse |
| 64 | ## http://discourse.example.com/admin/docker |
| 65 | hooks: |
| 66 | after_code: |
| 67 | - exec: |
| 68 | cd: $home/plugins |
| 69 | cmd: |
| 70 | - git clone https://github.com/discourse/docker_manager.git |
| 71 | |
| 72 | ## Remember, this is YAML syntax - you can only have one block with a name |
| 73 | run: |
| 74 | - exec: echo "Beginning of custom commands" |
| 75 | |
| 76 | ## If you want to configure password login for root, uncomment and change: |
| 77 | ## Use only one of the following lines: |
| 78 | #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root |
| 79 | #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root |
| 80 | |
| 81 | ## If you want to authorized additional users, uncomment and change: |
| 82 | #- exec: ssh-import-id username |
| 83 | #- exec: ssh-import-id anotherusername |
| 84 | |
| 85 | - exec: echo "End of custom commands" |
| 86 | - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}' |