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