-
Notifications
You must be signed in to change notification settings - Fork 1
Add discourse deployment playbook #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rubicae
wants to merge
2
commits into
master
Choose a base branch
from
discourse
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.retry | ||
*.retry | ||
.passwd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[defaults] | ||
roles_path=roles/ | ||
vault_password_file = .passwd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
$ANSIBLE_VAULT;1.1;AES256 | ||
36366165303533363865653535633937636234633366623939343632386238623038313663393366 | ||
6661346130396236653032623731393864393638323236380a363939303530653234643232366565 | ||
33396564356162633561633337623561373335656638333064323363653531336631633636386562 | ||
6133653538333461640a346335653365393132323166346534363563363261313865396532633765 | ||
64353631353962633361316532373964313362653634326663646430636132306264333736316565 | ||
32633537663731373362643863616361626439613832303261313966373439313761626436303137 | ||
64643833353663666432363261633139396231363131356436316130623739343362316436633361 | ||
35623965336131333363643666303633393666643637343930363732326538353062323830643865 | ||
39386462393536656531646137326463653463396238626237366166663737376361613063353832 | ||
65353430343232626137363661356432383039306239633239363065666663646332333964623734 | ||
33326138303232643732633164366339366632393062376232646639356464333831386463393630 | ||
62616633616137333565656636663336333864663964303165396339346336306336646161326637 | ||
36333837376164313636396534336232623738393732626634636238386230376135656466663431 | ||
36336162653238353239313132363161333038653838376635333435636262323133656265643630 | ||
30633562646136343165623036353533376337343230383666353063353736633135363634343938 | ||
61326430383937303439653963643263383735336166333265363132373865316162623065303831 | ||
37393630333733313531313066613237333433663936313235643262626437633139 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
- hosts: tachikoma | ||
become: yes | ||
tasks: | ||
- name: Install Docker | ||
apt: | ||
name: docker.io | ||
state: present | ||
- name: Clone discourse git repo | ||
git: | ||
repo: https://github.com/discourse/discourse_docker.git | ||
dest: /var/discourse | ||
- name: Copy discourse configuration | ||
template: | ||
src: discourse/app.yml | ||
dest: /var/discourse/containers/app.yml | ||
notify: rebuild discourse | ||
handlers: | ||
- name: rebuild discourse | ||
shell: /var/discourse/launcher rebuild app | ||
args: | ||
chdir: /var/discourse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{{ ansible_managed | comment }} | ||
## this is the all-in-one, standalone Discourse Docker container template | ||
## | ||
## After making changes to this file, you MUST rebuild | ||
## /var/discourse/launcher rebuild app | ||
## | ||
## BE *VERY* CAREFUL WHEN EDITING! | ||
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT! | ||
## visit http://www.yamllint.com/ to validate this file as needed | ||
|
||
templates: | ||
- "templates/postgres.template.yml" | ||
- "templates/redis.template.yml" | ||
- "templates/web.template.yml" | ||
- "templates/web.ratelimited.template.yml" | ||
- "templates/web.socketed.template.yml" | ||
|
||
# No tcp ports since we're using a socket: | ||
expose: | ||
# - "80:80" # http | ||
# - "443:443" # https | ||
|
||
params: | ||
db_default_text_search_config: "pg_catalog.english" | ||
|
||
## Set db_shared_buffers to a max of 25% of the total memory. | ||
## will be set automatically by bootstrap based on detected RAM, or you can override | ||
#db_shared_buffers: "2048MB" | ||
|
||
## can improve sorting performance, but adds memory usage per-connection | ||
#db_work_mem: "40MB" | ||
|
||
## Which Git revision should this container use? (default: tests-passed) | ||
#version: tests-passed | ||
|
||
env: | ||
LANG: en_US.UTF-8 | ||
# DISCOURSE_DEFAULT_LOCALE: en | ||
|
||
## How many concurrent web requests are supported? Depends on memory and CPU cores. | ||
## will be set automatically by bootstrap based on detected CPUs, or you can override | ||
UNICORN_WORKERS: 8 | ||
|
||
## TODO: The domain name this Discourse instance will respond to | ||
## Required. Discourse will not work with a bare IP number. | ||
DISCOURSE_HOSTNAME: discourse.queeriouslabs.com | ||
|
||
## Uncomment if you want the container to be started with the same | ||
## hostname (-h option) as specified above (default "$hostname-$config") | ||
#DOCKER_USE_HOSTNAME: true | ||
|
||
## TODO: List of comma delimited emails that will be made admin and developer | ||
## on initial signup example '[email protected],[email protected]' | ||
DISCOURSE_DEVELOPER_EMAILS: '{{ discourse_developer_email }}' | ||
|
||
DISCOURSE_SMTP_ADDRESS: {{ discourse_smtp_server }} | ||
DISCOURSE_SMTP_PORT: {{ discourse_smtp_port }} | ||
DISCOURSE_SMTP_USER_NAME: {{ discourse_smtp_username }} | ||
DISCOURSE_SMTP_PASSWORD: "{{ discourse_smtp_password }}" | ||
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true) | ||
|
||
## The CDN address for this Discourse instance (configured to pull) | ||
## see https://meta.discourse.org/t/14857 for details | ||
#DISCOURSE_CDN_URL: //discourse-cdn.example.com | ||
|
||
## The Docker container is stateless; all data is stored in /shared | ||
volumes: | ||
- volume: | ||
host: /var/discourse/shared/standalone | ||
guest: /shared | ||
- volume: | ||
host: /var/discourse/shared/standalone/log/var-log | ||
guest: /var/log | ||
|
||
## Plugins go here | ||
## see https://meta.discourse.org/t/19157 for details | ||
hooks: | ||
after_code: | ||
- exec: | ||
cd: $home/plugins | ||
cmd: | ||
- git clone https://github.com/discourse/docker_manager.git | ||
|
||
## Any custom commands to run after building | ||
run: | ||
- exec: echo "Beginning of custom commands" | ||
## If you want to set the 'From' email address for your first registration, uncomment and change: | ||
## After getting the first signup email, re-comment the line. It only needs to run once. | ||
#- exec: rails r "SiteSetting.notification_email='[email protected]'" | ||
- exec: echo "End of custom commands" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.