oops, 1.6.37 is not tagged yet use 36
[discourse_docker.git] / samples / web_only.yml
1 # IMPORTANT: SET A SECRET PASSWORD in Postgres for the Discourse User
2 # TODO: change SOME_SECRET in this template
3
4 templates:
5 - "templates/web.template.yml"
6 - "templates/web.ratelimited.template.yml"
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"
10
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
14 expose:
15 - "80:80" # http
16 - "443:443" # https
17
18 # Use 'links' key to link containers together, aka use Docker --link flag.
19 links:
20 - link:
21 name: data
22 alias: data
23
24 # any extra arguments for Docker?
25 # docker_args:
26
27 params:
28 ## Which Git revision should this container use? (default: tests-passed)
29 #version: tests-passed
30
31 env:
32 LANG: en_US.UTF-8
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
37 #UNICORN_WORKERS: 3
38
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 # SMTP ADDRESS, username, and password are required
52 # WARNING the char '#' in SMTP password can cause problems!
53 DISCOURSE_SMTP_ADDRESS: smtp.example.com
54 #DISCOURSE_SMTP_PORT: 587
55 DISCOURSE_SMTP_USER_NAME: user@example.com
56 DISCOURSE_SMTP_PASSWORD: pa$$word
57 #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
58
59 ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
60 #LETSENCRYPT_ACCOUNT_EMAIL: me@example.com
61
62 ## TODO: configure connectivity to the databases
63 DISCOURSE_DB_SOCKET: ''
64 #DISCOURSE_DB_USERNAME: discourse
65 DISCOURSE_DB_PASSWORD: SOME_SECRET
66 DISCOURSE_DB_HOST: data
67 DISCOURSE_REDIS_HOST: data
68
69 ## The http or https CDN address for this Discourse instance (configured to pull)
70 ## see https://meta.discourse.org/t/14857 for details
71 #DISCOURSE_CDN_URL: https://discourse-cdn.example.com
72
73 volumes:
74 - volume:
75 host: /var/discourse/shared/web-only
76 guest: /shared
77 - volume:
78 host: /var/discourse/shared/web-only/log/var-log
79 guest: /var/log
80
81 ## Plugins go here
82 ## see https://meta.discourse.org/t/19157 for details
83 hooks:
84 after_code:
85 - exec:
86 cd: $home/plugins
87 cmd:
88 - git clone https://github.com/discourse/docker_manager.git
89
90 ## Remember, this is YAML syntax - you can only have one block with a name
91 run:
92 - exec: echo "Beginning of custom commands"
93
94 ## If you want to configure password login for root, uncomment and change:
95 ## Use only one of the following lines:
96 #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root
97 #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root
98
99 ## If you want to authorized additional users, uncomment and change:
100 #- exec: ssh-import-id username
101 #- exec: ssh-import-id anotherusername
102
103 - exec: echo "End of custom commands"
104 - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'