Merge pull request #72 from riking/notify-email
[discourse_docker.git] / samples / standalone.yml
1 ##
2 ## After making changes to this file, you MUST rebuild for any changes
3 ## to take effect in your live Discourse instance:
4 ##
5 ## /var/discourse/launcher rebuild app
6 ##
7 ## Make sure to obey YAML syntax! You can use this site to help check:
8 ## http://www.yamllint.com/
9
10 ## this is the all-in-one, standalone Discourse Docker container template
11
12 # You may add rate limiting by uncommenting the web.ratelimited template.
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
16 templates:
17 - "templates/postgres.template.yml"
18 - "templates/redis.template.yml"
19 - "templates/web.template.yml"
20 - "templates/sshd.template.yml"
21 - "templates/web.ratelimited.template.yml"
22
23 ## which TCP/IP ports should this container expose?
24 expose:
25 - "80:80" # fwd host port 80 to container port 80 (http)
26 - "2222:22" # fwd host port 2222 to container port 22 (ssh)
27
28 params:
29 db_default_text_search_config: "pg_catalog.english"
30 ## Set db_shared_buffers to 1/3 of the memory you wish to allocate to postgres
31 ## on 1GB install set to 128MB on a 4GB instance you may raise to 1GB
32 #db_shared_buffers: "256MB"
33 #
34 ## Which Git revision should this container use? (default: tests-passed)
35 #version: tests-passed
36
37 env:
38 LANG: en_US.UTF-8
39 # DISCOURSE_DEFAULT_LOCALE: en
40
41 ## TODO: How many concurrent web requests are supported?
42 ## With 2GB we recommend 3-4 workers, with 1GB only 2
43 #UNICORN_WORKERS: 3
44
45 ## TODO: List of comma delimited emails that will be made admin and developer
46 ## on initial signup example 'user1@example.com,user2@example.com'
47 DISCOURSE_DEVELOPER_EMAILS: 'me@example.com'
48
49 ## TODO: The domain name this Discourse instance will respond to
50 DISCOURSE_HOSTNAME: 'discourse.example.com'
51
52 ## TODO: The mailserver this Discourse instance will use
53 DISCOURSE_SMTP_ADDRESS: smtp.example.com # (mandatory)
54 #DISCOURSE_SMTP_PORT: 587 # (optional)
55 #DISCOURSE_SMTP_USER_NAME: user@example.com # (optional)
56 #DISCOURSE_SMTP_PASSWORD: pa$$word # (optional)
57 #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
58
59 ## The CDN address for this Discourse instance (configured to pull)
60 #DISCOURSE_CDN_URL: //discourse-cdn.example.com
61
62 ## These containers are stateless, all data is stored in /shared
63 volumes:
64 - volume:
65 host: /var/discourse/shared/standalone
66 guest: /shared
67 - volume:
68 host: /var/discourse/shared/standalone/log/var-log
69 guest: /var/log
70
71 ## The docker manager plugin allows you to one-click upgrade Discourse
72 ## http://discourse.example.com/admin/docker
73 hooks:
74 after_code:
75 - exec:
76 cd: $home/plugins
77 cmd:
78 - mkdir -p plugins
79 - git clone https://github.com/discourse/docker_manager.git
80
81 ## Remember, this is YAML syntax - you can only have one block with a name
82 run:
83 - exec: echo "Beginning of custom commands"
84
85 ## If you want to set the 'From' email address for your first registration, uncomment and change:
86 #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
87 ## After getting the first signup email, re-comment the line. It only needs to run once.
88
89 ## If you want to configure password login for root, uncomment and change:
90 ## Use only one of the following lines:
91 #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root
92 #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root
93
94 ## If you want to authorized additional users, uncomment and change:
95 #- exec: ssh-import-id username
96 #- exec: ssh-import-id anotherusername
97
98 - exec: echo "End of custom commands"
99 - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'