# Ansible Playbook 用于安装 Docker、Discourse 和 Postfix

**URL:** https://meta.discourse.org/t/ansible-playbook-to-install-docker-discourse-and-postfix/62496
**Category:** Sysadmins
**Tags:** docker, reference
**Created:** [2017年五月11日 09:47 UTC](https://meta.discourse.org/t/ansible-playbook-to-install-docker-discourse-and-postfix/62496 "2017-05-11T09:47:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![chrisc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisc/32/119982_2.png) [@chrisc](https://meta.discourse.org/u/chrisc)
#### Post date: [2017年五月11日 09:47 UTC](https://meta.discourse.org/t/ansible-playbook-to-install-docker-discourse-and-postfix/62496/1 "2017-05-11T09:47:48Z")

</div>

Though I’d post this here since I found a lot of useful help on this forum and perhaps if I leave a note regarding what I learnt and then implemented then it might help someone else in the future.

I have helped setup a Discourse forum at [community.coops.tech](https://community.coops.tech/) using the official Docker install, Postfix doing incoming and outgoing email on the host, with measures to prevent backscatter on Debian Stretch.

The [Ansible Playbooks are available](https://git.coop/cotech/ansible) at [git.coop](https://git.coop/) and the email setup is based on the [mail-reciever Docker container](https://github.com/discourse/mail-receiver) plus [this pull request](https://github.com/discourse/mail-receiver/pull/2) (which is now merged) and the [Postfix notes for using the host for outgoing email](https://meta.discourse.org/t/emails-with-local-smtp/23645/28), with an additional [Ruby script](https://git.coop/cotech/ansible/blob/master/roles/email/files/discourse-smtp-rcpt-acl).

Some of the things in the Playbooks are specific to the [Webarchitects](https://www.webarchitects.coop/) environment they have been written for so they probably couldn’t be directly used elsewhere, but if anyone would our help with installing Discourse like this then feel free to [contact us](https://www.webarchitects.coop/contact).

---

<div class="post-metadata">

### Author: ![chrisc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisc/32/119982_2.png) [@chrisc](https://meta.discourse.org/u/chrisc)
#### Post date: [2017年十一月8日 11:11 UTC](https://meta.discourse.org/t/ansible-playbook-to-install-docker-discourse-and-postfix/62496/2 "2017-11-08T11:11:16Z")

</div>

Since I wrote the above I have created another, probably more suitable version, (many of the things spcifically for our hosting setup and preferences have been removed into other playbooks), of the Ansible playboks to install Docker, Discourse and Postfix:

> **[webarch / discourse · GitLab](https://git.coop/webarch/discourse)**
>
> Ansible Playbooks for Discourse deployment, configuration and maintenance.

There are also playbooks to upgrade Docker and Discourse and (sorry for the shameless plug 😊) we are able to offer [virtual servers](https://www.webarchitects.coop/discourse) which are installed and maintained using these playbooks.
