Merge pull request #30 from Supermathie/fix-hang
[discourse_docker.git] / samples / standalone.yml
CommitLineData
b6f290a0
SS
1# this is the base templates used, you can cut it down to include less functionality per container
2templates:
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"
e741295a 8
fbdbfba4
SS
9# which ports to expose?
10expose:
e741295a
MB
11 - "80:80" # fwd host port 80 to container port 80 (http)
12 - "2222:22" # fwd host port 2222 to container port 22 (ssh)
fbdbfba4
SS
13
14params:
fbdbfba4
SS
15 # git revision to run
16 version: HEAD
17
fbdbfba4 18env:
863d6270
S
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 #
e741295a
MB
28 # comma-separated emails
29 DISCOURSE_DEVELOPER_EMAILS: 'my_email@example.com'
38000fc6
SS
30 # CHANGE ME to your hostname
31 DISCOURSE_HOSTNAME: 'www.example.com'
32 # SET ME to your smtp server eg mandrill
c148f4c9 33 # don't forget to set mail
e741295a
MB
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)
1fe0bcd3 38
e741295a 39# These containers are stateless, all the data is stored in /shared
1fe0bcd3
SS
40volumes:
41 - volume:
e741295a 42 host: /var/docker/shared/standalone
1fe0bcd3 43 guest: /shared
b488838a
SS
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
47hooks:
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
e741295a
MB
54
55# Remember, this is YAML syntax - you can only have one block with a name
56run:
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;}'