Commit | Line | Data |
---|---|---|
94153e98 JA |
1 | ## |
2 | ## After making changes to this file, you MUST rebuild for any changes | |
3 | ## to take effect in your live Discourse instance: | |
be82e068 | 4 | ## |
563dab7d | 5 | ## /var/discourse/launcher rebuild app |
94153e98 | 6 | ## |
cc0d15c5 | 7 | ## Make sure to obey YAML syntax! You can use this site to help check: |
8 | ## http://www.yamllint.com/ | |
94153e98 JA |
9 | |
10 | ## this is the all-in-one, standalone Discourse Docker container template | |
c687dd7b | 11 | |
85a3eaaf | 12 | # You may add rate limiting by uncommenting the web.ratelimited template. |
c687dd7b S |
13 | # Out of the box it allows 12 reqs a second per ip, and 100 per minute per ip |
14 | # This is configurable by amending the params in this file | |
15 | ||
b6f290a0 | 16 | templates: |
b6f290a0 SS |
17 | - "templates/postgres.template.yml" |
18 | - "templates/redis.template.yml" | |
b6f290a0 | 19 | - "templates/web.template.yml" |
b1bc7d97 | 20 | - "templates/web.ratelimited.template.yml" |
e741295a | 21 | |
bfb121aa DT |
22 | ## Comment out the following lines if you wish to add Lets Encrypt for your Discourse install |
23 | # - "templates/web.ssl.template.yml" | |
24 | # - "templates/web.letsencrypt.ssl.template.yml" | |
25 | ||
94153e98 | 26 | ## which TCP/IP ports should this container expose? |
fbdbfba4 | 27 | expose: |
e741295a | 28 | - "80:80" # fwd host port 80 to container port 80 (http) |
95bbc001 | 29 | - "443:443" # fwd host port 443 to container port 443 (https) (ssl ready) |
7a0c3176 | 30 | # If you want Discourse to share a port with another webserver like Apache or nginx, |
31 | # see https://meta.discourse.org/t/17247 for instructions. | |
fbdbfba4 | 32 | |
8b617e6e PG |
33 | # any extra arguments for Docker? |
34 | # docker_args: | |
35 | ||
6f99f3c2 | 36 | params: |
e56a65f6 | 37 | db_default_text_search_config: "pg_catalog.english" |
80a6f24a S |
38 | |
39 | ## Set db_shared_buffers to a max of 25% of the total memory. | |
40 | ## | |
41 | ## On 1GB installs set to 128MB (to leave room for other processes) | |
42 | ## on a 4GB instance you may raise to 1GB | |
6f99f3c2 S |
43 | #db_shared_buffers: "256MB" |
44 | # | |
80a6f24a S |
45 | ## Set higher on large instances it defaults to 10MB, for a 3GB install 40MB is a good default |
46 | ## this improves sorting performance, but adds memory usage per-connection | |
47 | #db_work_mem: "40MB" | |
48 | # | |
093a73b4 JA |
49 | ## Which Git revision should this container use? (default: tests-passed) |
50 | #version: tests-passed | |
fbdbfba4 | 51 | |
fbdbfba4 | 52 | env: |
3cb3d9c4 | 53 | LANG: en_US.UTF-8 |
cc0d15c5 | 54 | # DISCOURSE_DEFAULT_LOCALE: en |
55 | ||
e56a65f6 | 56 | ## TODO: How many concurrent web requests are supported? |
94153e98 | 57 | ## With 2GB we recommend 3-4 workers, with 1GB only 2 |
7799fb73 | 58 | ## If you have lots of memory, use one or two workers per logical CPU core |
075922a5 | 59 | #UNICORN_WORKERS: 3 |
cc0d15c5 | 60 | |
e56a65f6 | 61 | ## TODO: List of comma delimited emails that will be made admin and developer |
c82ae929 | 62 | ## on initial signup example 'user1@example.com,user2@example.com' |
093a73b4 | 63 | DISCOURSE_DEVELOPER_EMAILS: 'me@example.com' |
cc0d15c5 | 64 | |
e56a65f6 | 65 | ## TODO: The domain name this Discourse instance will respond to |
94153e98 | 66 | DISCOURSE_HOSTNAME: 'discourse.example.com' |
c6dd6f9d FB |
67 | ## TODO: Uncomment if you want the container to be started with the same |
68 | ## hostname (-h option) as specified above (default "$hostname-$config") | |
69 | ## NOTE: 'true' is the only valid value here, any other will be ignored | |
70 | #DOCKER_USE_HOSTNAME: true | |
cc0d15c5 | 71 | |
e56a65f6 | 72 | ## TODO: The mailserver this Discourse instance will use |
093a73b4 | 73 | DISCOURSE_SMTP_ADDRESS: smtp.example.com # (mandatory) |
075922a5 CR |
74 | #DISCOURSE_SMTP_PORT: 587 # (optional) |
75 | #DISCOURSE_SMTP_USER_NAME: user@example.com # (optional) | |
7439768e | 76 | #DISCOURSE_SMTP_PASSWORD: pa$$word # (optional, WARNING the char '#' in pw can cause problems!) |
b1d030e5 | 77 | #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true) |
b2764a96 | 78 | |
bfb121aa DT |
79 | ## The Lets Encrypt email will allow you to register a FREE SSL certificate if you added the Lets Encrypt template, comment it out if you have set this up |
80 | # LETSENCRYPT_ACCOUNT_EMAIL: email@awesomedomain.com | |
cc0d15c5 | 81 | |
1cb802ad | 82 | ## The CDN address for this Discourse instance (configured to pull) |
075922a5 | 83 | #DISCOURSE_CDN_URL: //discourse-cdn.example.com |
1fe0bcd3 | 84 | |
94153e98 | 85 | ## These containers are stateless, all data is stored in /shared |
1fe0bcd3 SS |
86 | volumes: |
87 | - volume: | |
be82e068 | 88 | host: /var/discourse/shared/standalone |
1fe0bcd3 | 89 | guest: /shared |
be82e068 S |
90 | - volume: |
91 | host: /var/discourse/shared/standalone/log/var-log | |
92 | guest: /var/log | |
b488838a | 93 | |
6b21e9cd | 94 | ## The docker manager plugin allows you to one-click upgrade Discourse |
94153e98 | 95 | ## http://discourse.example.com/admin/docker |
b488838a SS |
96 | hooks: |
97 | after_code: | |
98 | - exec: | |
99 | cd: $home/plugins | |
100 | cmd: | |
b488838a | 101 | - git clone https://github.com/discourse/docker_manager.git |
e741295a | 102 | |
94153e98 | 103 | ## Remember, this is YAML syntax - you can only have one block with a name |
e741295a MB |
104 | run: |
105 | - exec: echo "Beginning of custom commands" | |
106 | ||
9c329429 | 107 | ## If you want to set the 'From' email address for your first registration, uncomment and change: |
108 | #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'" | |
109 | ## After getting the first signup email, re-comment the line. It only needs to run once. | |
110 | ||
e741295a | 111 | ## If you want to configure password login for root, uncomment and change: |
e741295a MB |
112 | ## Use only one of the following lines: |
113 | #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root | |
114 | #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root | |
115 | ||
e741295a | 116 | - exec: echo "End of custom commands" |