Commit | Line | Data |
---|---|---|
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 | 4 | templates: |
67a25ebf | 5 | - "templates/web.template.yml" |
b1bc7d97 | 6 | - "templates/web.ratelimited.template.yml" |
67a25ebf SS |
7 | |
8 | expose: | |
9 | - "80:80" | |
10 | - "2222:22" | |
11 | ||
629958bf EG |
12 | # Use 'links' key to link containers together, aka use Docker --link flag. |
13 | links: | |
14 | - link: | |
15 | name: data | |
16 | alias: data | |
17 | ||
2f9bf9d0 PG |
18 | # any extra arguments for Docker? |
19 | # docker_args: | |
20 | ||
1a58daf4 | 21 | params: |
e56a65f6 MB |
22 | ## Which Git revision should this container use? (default: tests-passed) |
23 | #version: tests-passed | |
67a25ebf | 24 | |
67a25ebf | 25 | env: |
3cb3d9c4 | 26 | LANG: en_US.UTF-8 |
e56a65f6 MB |
27 | ## TODO: How many concurrent web requests are supported? |
28 | ## With 2GB we recommend 3-4 workers, with 1GB only 2 | |
7799fb73 | 29 | ## If you have lots of memory, use one or two workers per logical CPU core |
e56a65f6 | 30 | #UNICORN_WORKERS: 3 |
3cb3d9c4 | 31 | |
e56a65f6 | 32 | ## TODO: configure connectivity to the databases |
7af2a47c | 33 | DISCOURSE_DB_SOCKET: '' |
290c4e03 | 34 | #DISCOURSE_DB_USERNAME: discourse |
7af2a47c | 35 | DISCOURSE_DB_PASSWORD: SOME_SECRET |
629958bf EG |
36 | DISCOURSE_DB_HOST: data |
37 | DISCOURSE_REDIS_HOST: data | |
e56a65f6 MB |
38 | ## |
39 | ## TODO: List of comma delimited emails that will be made admin and developer | |
c82ae929 | 40 | ## on initial signup example 'user1@example.com,user2@example.com' |
e56a65f6 MB |
41 | DISCOURSE_DEVELOPER_EMAILS: 'me@example.com' |
42 | ## | |
43 | ## TODO: The domain name this Discourse instance will respond to | |
44 | DISCOURSE_HOSTNAME: 'discourse.example.com' | |
d5b3a8a3 JA |
45 | ## |
46 | ## Uncomment if you want the container to be started with the same | |
47 | ## hostname (-h option) as specified above (default "$hostname-$config") | |
c6dd6f9d | 48 | #DOCKER_USE_HOSTNAME: true |
e56a65f6 MB |
49 | ## |
50 | ## TODO: The mailserver this Discourse instance will use | |
51 | DISCOURSE_SMTP_ADDRESS: smtp.example.com # (mandatory) | |
52 | #DISCOURSE_SMTP_PORT: 587 # (optional) | |
53 | #DISCOURSE_SMTP_USER_NAME: user@example.com # (optional) | |
54 | #DISCOURSE_SMTP_PASSWORD: pa$$word # (optional) | |
55 | ## | |
56 | ## The CDN address for this Discourse instance (configured to pull) | |
57 | #DISCOURSE_CDN_URL: //discourse-cdn.example.com | |
67a25ebf SS |
58 | |
59 | volumes: | |
60 | - volume: | |
be82e068 S |
61 | host: /var/discourse/shared/web-only |
62 | guest: /shared | |
be82e068 S |
63 | - volume: |
64 | host: /var/discourse/shared/web-only/log/var-log | |
65 | guest: /var/log | |
67a25ebf | 66 | |
e56a65f6 MB |
67 | ## The docker manager plugin allows you to one-click upgrade Discouse |
68 | ## http://discourse.example.com/admin/docker | |
67a25ebf SS |
69 | hooks: |
70 | after_code: | |
71 | - exec: | |
72 | cd: $home/plugins | |
73 | cmd: | |
67a25ebf | 74 | - git clone https://github.com/discourse/docker_manager.git |
e56a65f6 MB |
75 | |
76 | ## Remember, this is YAML syntax - you can only have one block with a name | |
77 | run: | |
78 | - exec: echo "Beginning of custom commands" | |
79 | ||
80 | ## If you want to configure password login for root, uncomment and change: | |
e56a65f6 MB |
81 | ## Use only one of the following lines: |
82 | #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root | |
83 | #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root | |
84 | ||
85 | ## If you want to authorized additional users, uncomment and change: | |
86 | #- exec: ssh-import-id username | |
87 | #- exec: ssh-import-id anotherusername | |
88 | ||
89 | - exec: echo "End of custom commands" | |
90 | - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}' |