FIX: logrotation for containers that constantly rebuild
[discourse_docker.git] / samples / standalone.yml
CommitLineData
94153e98
JA
1##
2## After making changes to this file, you MUST rebuild for any changes
3## to take effect in your live Discourse instance:
be82e068 4##
563dab7d 5## /var/discourse/launcher rebuild app
94153e98
JA
6##
7
8## this is the all-in-one, standalone Discourse Docker container template
c687dd7b
S
9
10# You may add rate limiting to by commenting out the ratelimited template.
11# Out of the box it allows 12 reqs a second per ip, and 100 per minute per ip
12# This is configurable by amending the params in this file
13
b6f290a0 14templates:
b6f290a0
SS
15 - "templates/postgres.template.yml"
16 - "templates/redis.template.yml"
b6f290a0 17 - "templates/web.template.yml"
be82e068 18 - "templates/sshd.template.yml"
c687dd7b 19 #- "templates/web.ratelimited.template.yml"
e741295a 20
94153e98 21## which TCP/IP ports should this container expose?
fbdbfba4 22expose:
e741295a
MB
23 - "80:80" # fwd host port 80 to container port 80 (http)
24 - "2222:22" # fwd host port 2222 to container port 22 (ssh)
fbdbfba4 25
6f99f3c2 26params:
e56a65f6
MB
27 db_default_text_search_config: "pg_catalog.english"
28 ## Set db_shared_buffers to 1/3 of the memory you wish to allocate to postgres
29 ## on 1GB install set to 128MB on a 4GB instance you may raise to 1GB
6f99f3c2
S
30 #db_shared_buffers: "256MB"
31 #
093a73b4
JA
32 ## Which Git revision should this container use? (default: tests-passed)
33 #version: tests-passed
fbdbfba4 34
fbdbfba4 35env:
3cb3d9c4 36 LANG: en_US.UTF-8
e56a65f6 37 ## TODO: How many concurrent web requests are supported?
94153e98 38 ## With 2GB we recommend 3-4 workers, with 1GB only 2
075922a5 39 #UNICORN_WORKERS: 3
94153e98 40 ##
e56a65f6 41 ## TODO: List of comma delimited emails that will be made admin and developer
093a73b4
JA
42 ## on initial signup example 'user1@example.com, user2@example.com'
43 DISCOURSE_DEVELOPER_EMAILS: 'me@example.com'
94153e98 44 ##
e56a65f6 45 ## TODO: The domain name this Discourse instance will respond to
94153e98
JA
46 DISCOURSE_HOSTNAME: 'discourse.example.com'
47 ##
e56a65f6 48 ## TODO: The mailserver this Discourse instance will use
093a73b4 49 DISCOURSE_SMTP_ADDRESS: smtp.example.com # (mandatory)
075922a5
CR
50 #DISCOURSE_SMTP_PORT: 587 # (optional)
51 #DISCOURSE_SMTP_USER_NAME: user@example.com # (optional)
093a73b4 52 #DISCOURSE_SMTP_PASSWORD: pa$$word # (optional)
b7f50969 53 ##
1cb802ad 54 ## The CDN address for this Discourse instance (configured to pull)
075922a5 55 #DISCOURSE_CDN_URL: //discourse-cdn.example.com
1fe0bcd3 56
94153e98 57## These containers are stateless, all data is stored in /shared
1fe0bcd3
SS
58volumes:
59 - volume:
be82e068 60 host: /var/discourse/shared/standalone
1fe0bcd3 61 guest: /shared
be82e068
S
62 - volume:
63 host: /var/discourse/shared/standalone/log/var-log
64 guest: /var/log
b488838a 65
94153e98
JA
66## The docker manager plugin allows you to one-click upgrade Discouse
67## http://discourse.example.com/admin/docker
b488838a
SS
68hooks:
69 after_code:
70 - exec:
71 cd: $home/plugins
72 cmd:
73 - mkdir -p plugins
74 - git clone https://github.com/discourse/docker_manager.git
e741295a 75
94153e98 76## Remember, this is YAML syntax - you can only have one block with a name
e741295a
MB
77run:
78 - exec: echo "Beginning of custom commands"
79
80 ## If you want to configure password login for root, uncomment and change:
81 #- exec: apt-get -y install whois # for mkpasswd
82 ## Use only one of the following lines:
83 #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root
84 #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root
85
86 ## If you want to authorized additional users, uncomment and change:
87 #- exec: ssh-import-id username
88 #- exec: ssh-import-id anotherusername
89
90 - exec: echo "End of custom commands"
91 - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'