Update samples (#385)
[discourse_docker.git] / samples / web_only.yml
CommitLineData
80c11be3 1# IMPORTANT: SET A SECRET PASSWORD in Postgres for the Discourse User
e56a65f6 2# TODO: change SOME_SECRET in this template
80c11be3 3
67a25ebf 4templates:
67a25ebf 5 - "templates/web.template.yml"
b1bc7d97 6 - "templates/web.ratelimited.template.yml"
23c730f0
JP
7## Uncomment these two lines if you wish to add Lets Encrypt (https)
8 #- "templates/web.ssl.template.yml"
9 #- "templates/web.letsencrypt.ssl.template.yml"
67a25ebf 10
23c730f0
JP
11## which TCP/IP ports should this container expose?
12## If you want Discourse to share a port with another webserver like Apache or nginx,
13## see https://meta.discourse.org/t/17247 for details
67a25ebf 14expose:
23c730f0
JP
15 - "80:80" # http
16 - "443:443" # https
67a25ebf 17
629958bf
EG
18# Use 'links' key to link containers together, aka use Docker --link flag.
19links:
20 - link:
21 name: data
22 alias: data
23
2f9bf9d0
PG
24# any extra arguments for Docker?
25# docker_args:
26
1a58daf4 27params:
e56a65f6
MB
28 ## Which Git revision should this container use? (default: tests-passed)
29 #version: tests-passed
67a25ebf 30
67a25ebf 31env:
3cb3d9c4 32 LANG: en_US.UTF-8
23c730f0
JP
33 # DISCOURSE_DEFAULT_LOCALE: en
34
35 ## How many concurrent web requests are supported? Depends on memory and CPU cores.
36 ## will be set automatically by bootstrap based on detected CPUs, or you can override
e56a65f6 37 #UNICORN_WORKERS: 3
3cb3d9c4 38
23c730f0
JP
39 ## TODO: The domain name this Discourse instance will respond to
40 DISCOURSE_HOSTNAME: 'discourse.example.com'
41
42 ## Uncomment if you want the container to be started with the same
43 ## hostname (-h option) as specified above (default "$hostname-$config")
44 #DOCKER_USE_HOSTNAME: true
45
46 ## TODO: List of comma delimited emails that will be made admin and developer
47 ## on initial signup example 'user1@example.com,user2@example.com'
48 DISCOURSE_DEVELOPER_EMAILS: 'me@example.com,you@example.com'
49
50 ## TODO: The SMTP mail server used to validate new accounts and send notifications
51 DISCOURSE_SMTP_ADDRESS: smtp.example.com # required
52 #DISCOURSE_SMTP_PORT: 587 # (optional, default 587)
53 #DISCOURSE_SMTP_USER_NAME: user@example.com # required
54 #DISCOURSE_SMTP_PASSWORD: pa$$word # required, WARNING the char '#' in pw can cause problems!
55 #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
56
57 ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
58 #LETSENCRYPT_ACCOUNT_EMAIL: me@example.com
59
e56a65f6 60 ## TODO: configure connectivity to the databases
7af2a47c 61 DISCOURSE_DB_SOCKET: ''
290c4e03 62 #DISCOURSE_DB_USERNAME: discourse
7af2a47c 63 DISCOURSE_DB_PASSWORD: SOME_SECRET
629958bf
EG
64 DISCOURSE_DB_HOST: data
65 DISCOURSE_REDIS_HOST: data
23c730f0 66
e56a65f6
MB
67 ## The CDN address for this Discourse instance (configured to pull)
68 #DISCOURSE_CDN_URL: //discourse-cdn.example.com
67a25ebf
SS
69
70volumes:
71 - volume:
be82e068
S
72 host: /var/discourse/shared/web-only
73 guest: /shared
be82e068
S
74 - volume:
75 host: /var/discourse/shared/web-only/log/var-log
76 guest: /var/log
67a25ebf 77
23c730f0
JP
78## Plugins go here
79## see https://meta.discourse.org/t/19157 for details
67a25ebf
SS
80hooks:
81 after_code:
82 - exec:
83 cd: $home/plugins
84 cmd:
67a25ebf 85 - git clone https://github.com/discourse/docker_manager.git
e56a65f6
MB
86
87## Remember, this is YAML syntax - you can only have one block with a name
88run:
89 - exec: echo "Beginning of custom commands"
90
91 ## If you want to configure password login for root, uncomment and change:
e56a65f6
MB
92 ## Use only one of the following lines:
93 #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root
94 #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root
95
96 ## If you want to authorized additional users, uncomment and change:
97 #- exec: ssh-import-id username
98 #- exec: ssh-import-id anotherusername
99
100 - exec: echo "End of custom commands"
101 - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'