Update standalone.yml
[discourse_docker.git] / samples / standalone.yml
1 # this is the base templates used, you can cut it down to include less functionality per container
2 templates:
3 - "templates/cron.template.yml"
4 - "templates/postgres.template.yml"
5 - "templates/redis.template.yml"
6 - "templates/sshd.template.yml"
7 - "templates/web.template.yml"
8
9 # which ports to expose?
10 expose:
11 - "80:80" # fwd host port 80 to container port 80 (http)
12 - "2222:22" # fwd host port 2222 to container port 22 (ssh)
13
14 params:
15 # git revision to run
16 version: HEAD
17
18 env:
19 # Number of web workers, the more workers you have the more
20 # memory will be consumed.
21 # On 2GB setups we recommend 3-4 workers
22 # On 1GB setups we recommend 2 workers
23 # Default (3)
24 #
25 # UNICORN_WORKERS: 3
26 #
27 #
28 # comma-separated emails
29 DISCOURSE_DEVELOPER_EMAILS: 'my_email@example.com'
30 # CHANGE ME to your hostname
31 DISCOURSE_HOSTNAME: 'www.example.com'
32 # SET ME to your smtp server eg mandrill
33 # don't forget to set mail
34 DISCOURSE_SMTP_ADDRESS: smtp.example.com # (mandatory)
35 # DISCOURSE_SMTP_PORT: 587 # (optional)
36 # DISCOURSE_SMTP_USER_NAME: user@example.com # (optional)
37 # DISCOURSE_SMTP_PASSWORD: p@ssword # (optional)
38
39 # These containers are stateless, all the data is stored in /shared
40 volumes:
41 - volume:
42 host: /var/docker/shared/standalone
43 guest: /shared
44
45 # you may use the docker manager to upgrade and monitor your docker image
46 # UI will be visible at http://yoursite.com/admin/docker
47 hooks:
48 after_code:
49 - exec:
50 cd: $home/plugins
51 cmd:
52 - mkdir -p plugins
53 - git clone https://github.com/discourse/docker_manager.git
54
55 # Remember, this is YAML syntax - you can only have one block with a name
56 run:
57 - exec: echo "Beginning of custom commands"
58
59 ## If you want to configure password login for root, uncomment and change:
60 #- exec: apt-get -y install whois # for mkpasswd
61 ## Use only one of the following lines:
62 #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root
63 #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root
64
65 ## If you want to authorized additional users, uncomment and change:
66 #- exec: ssh-import-id username
67 #- exec: ssh-import-id anotherusername
68
69 - exec: echo "End of custom commands"
70 - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'