fix
[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/docker/launcher rebuild app
6 ##
7
8 ## this is the all-in-one, standalone Discourse Docker container template
9 templates:
10 - "templates/postgres.template.yml"
11 - "templates/redis.template.yml"
12 - "templates/web.template.yml"
13 - "templates/sshd.template.yml"
14
15 ## which TCP/IP ports should this container expose?
16 expose:
17 - "80:80" # fwd host port 80 to container port 80 (http)
18 - "2222:22" # fwd host port 2222 to container port 22 (ssh)
19
20 params:
21 db_default_text_search_config: "pb_catelog.english"
22 ## Set db_shared_buffers to 1/3 of the memory you wish to allocate to postgres
23 ## on 1GB install set to 128MB on a 4GB instance you may raise to 1GB
24 #db_shared_buffers: "256MB"
25 #
26 ## Which Git revision should this container use? (default: tests-passed)
27 #version: tests-passed
28
29 env:
30 LANG: en_US.UTF-8
31 ## How many concurrent web requests are supported?
32 ## With 2GB we recommend 3-4 workers, with 1GB only 2
33 #UNICORN_WORKERS: 3
34 ##
35 ## List of comma delimited emails that will be made admin and developer
36 ## on initial signup example 'user1@example.com, user2@example.com'
37 DISCOURSE_DEVELOPER_EMAILS: 'me@example.com'
38 ##
39 ## The domain name this Discourse instance will respond to
40 DISCOURSE_HOSTNAME: 'discourse.example.com'
41 ##
42 ## The mailserver this Discourse instance will use
43 DISCOURSE_SMTP_ADDRESS: smtp.example.com # (mandatory)
44 #DISCOURSE_SMTP_PORT: 587 # (optional)
45 #DISCOURSE_SMTP_USER_NAME: user@example.com # (optional)
46 #DISCOURSE_SMTP_PASSWORD: pa$$word # (optional)
47 ##
48 ## The CDN address for this Discourse instance (configured to pull)
49 #DISCOURSE_CDN_URL: //discourse-cdn.example.com
50
51 ## These containers are stateless, all data is stored in /shared
52 volumes:
53 - volume:
54 host: /var/discourse/shared/standalone
55 guest: /shared
56 - volume:
57 host: /var/discourse/shared/standalone/log/var-log
58 guest: /var/log
59
60 ## The docker manager plugin allows you to one-click upgrade Discouse
61 ## http://discourse.example.com/admin/docker
62 hooks:
63 after_code:
64 - exec:
65 cd: $home/plugins
66 cmd:
67 - mkdir -p plugins
68 - git clone https://github.com/discourse/docker_manager.git
69
70 ## Remember, this is YAML syntax - you can only have one block with a name
71 run:
72 - exec: echo "Beginning of custom commands"
73
74 ## If you want to configure password login for root, uncomment and change:
75 #- exec: apt-get -y install whois # for mkpasswd
76 ## Use only one of the following lines:
77 #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root
78 #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root
79
80 ## If you want to authorized additional users, uncomment and change:
81 #- exec: ssh-import-id username
82 #- exec: ssh-import-id anotherusername
83
84 - exec: echo "End of custom commands"
85 - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'