Commit | Line | Data |
---|---|---|
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: | |
4 | ## | |
093a73b4 | 5 | ## ./var/docker/launcher rebuild app |
94153e98 JA |
6 | ## |
7 | ||
8 | ## this is the all-in-one, standalone Discourse Docker container template | |
b6f290a0 SS |
9 | templates: |
10 | - "templates/cron.template.yml" | |
11 | - "templates/postgres.template.yml" | |
12 | - "templates/redis.template.yml" | |
13 | - "templates/sshd.template.yml" | |
14 | - "templates/web.template.yml" | |
e741295a | 15 | |
94153e98 | 16 | ## which TCP/IP ports should this container expose? |
fbdbfba4 | 17 | expose: |
e741295a MB |
18 | - "80:80" # fwd host port 80 to container port 80 (http) |
19 | - "2222:22" # fwd host port 2222 to container port 22 (ssh) | |
fbdbfba4 | 20 | |
b56a2bd7 | 21 | #params: |
093a73b4 JA |
22 | ## Which Git revision should this container use? (default: tests-passed) |
23 | #version: tests-passed | |
fbdbfba4 | 24 | |
fbdbfba4 | 25 | env: |
3cb3d9c4 | 26 | LANG: en_US.UTF-8 |
94153e98 JA |
27 | ## How many concurrent web requests are supported? |
28 | ## With 2GB we recommend 3-4 workers, with 1GB only 2 | |
075922a5 | 29 | #UNICORN_WORKERS: 3 |
94153e98 | 30 | ## |
093a73b4 JA |
31 | ## List of comma delimited emails that will be made admin and developer |
32 | ## on initial signup example 'user1@example.com, user2@example.com' | |
33 | DISCOURSE_DEVELOPER_EMAILS: 'me@example.com' | |
94153e98 JA |
34 | ## |
35 | ## The domain name this Discourse instance will respond to | |
36 | DISCOURSE_HOSTNAME: 'discourse.example.com' | |
37 | ## | |
38 | ## The mailserver this Discourse instance will use | |
093a73b4 | 39 | DISCOURSE_SMTP_ADDRESS: smtp.example.com # (mandatory) |
075922a5 CR |
40 | #DISCOURSE_SMTP_PORT: 587 # (optional) |
41 | #DISCOURSE_SMTP_USER_NAME: user@example.com # (optional) | |
093a73b4 | 42 | #DISCOURSE_SMTP_PASSWORD: pa$$word # (optional) |
b7f50969 JA |
43 | ## |
44 | ## the origin pull CDN address for this Discourse instance | |
075922a5 | 45 | #DISCOURSE_CDN_URL: //discourse-cdn.example.com |
1fe0bcd3 | 46 | |
94153e98 | 47 | ## These containers are stateless, all data is stored in /shared |
1fe0bcd3 SS |
48 | volumes: |
49 | - volume: | |
e741295a | 50 | host: /var/docker/shared/standalone |
1fe0bcd3 | 51 | guest: /shared |
b488838a | 52 | |
94153e98 JA |
53 | ## The docker manager plugin allows you to one-click upgrade Discouse |
54 | ## http://discourse.example.com/admin/docker | |
b488838a SS |
55 | hooks: |
56 | after_code: | |
57 | - exec: | |
58 | cd: $home/plugins | |
59 | cmd: | |
60 | - mkdir -p plugins | |
61 | - git clone https://github.com/discourse/docker_manager.git | |
e741295a | 62 | |
94153e98 | 63 | ## Remember, this is YAML syntax - you can only have one block with a name |
e741295a MB |
64 | run: |
65 | - exec: echo "Beginning of custom commands" | |
66 | ||
67 | ## If you want to configure password login for root, uncomment and change: | |
68 | #- exec: apt-get -y install whois # for mkpasswd | |
69 | ## Use only one of the following lines: | |
70 | #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root | |
71 | #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root | |
72 | ||
73 | ## If you want to authorized additional users, uncomment and change: | |
74 | #- exec: ssh-import-id username | |
75 | #- exec: ssh-import-id anotherusername | |
76 | ||
77 | - exec: echo "End of custom commands" | |
78 | - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}' |