Skip to content
Snippets Groups Projects
Commit e57e677c authored by jurgenhaas's avatar jurgenhaas
Browse files

Initial components, not working yet

parent 82bbeb0b
No related branches found
No related tags found
No related merge requests found
https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md
Log: /var/discourse/shared/standalone/log/rails/production.log
Usage: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
Commands:
start: Start/initialize a container
stop: Stop a running container
restart: Restart a container
destroy: Stop and remove a container
enter: Use nsenter to get a shell into a container
logs: View the Docker logs for a container
bootstrap: Bootstrap a container for the config based on a template
rebuild: Rebuild a container (destroy old, bootstrap, start new)
cleanup: Remove all containers that have stopped for > 24 hours
Options:
--skip-prereqs Don't check launcher prerequisites
--docker-args Extra arguments to pass when running docker
Manually create admin:
```
cd /var/discourse
./launcher enter app
rake admin:create
```
Upgrade: http://172.17.0.1/admin/upgrade
Drupal Integration:
- https://www.drupal.org/project/discourse
- https://www.drupal.org/project/discourse_sso
- https://www.drupal.org/node/2880123#comment-12312794
discourse_git_repo: 'https://github.com/discourse/discourse_docker.git'
---
dependencies:
- { role: docker }
---
# file: roles/discourse/tasks/install.yml
- name: "Clone Repository"
git:
accept_hostkey: yes
repo: '{{ discourse_git_repo }}'
dest: '/var/discourse'
register: discourse_repository
- block:
- name: "Configure"
# /var/discourse/containers/app.yml
- name: "Install"
# /var/discourse/discourse-setup
# /var/discourse/launcher rebuild app
when: discourse_repository.changed
---
# file: roles/discourse/tasks/main.yml
- name: "Docker Discourse"
set_fact: role_discourse_started=true
tags: always
- block:
- include_tasks: 'install.yml'
when: '"discourse" not in excluded_roles'
# See also https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247
<Proxy balancer://unicorns>
BalancerMember http://127.0.0.1:4000
</Proxy>
<VirtualHost *:80>
ServerName my.example.com
CustomLog logs/sites/my.example.com/access_log combined
ErrorLog logs/sites/my.example.com/error_log
ServerAdmin me@example.com
DocumentRoot /var/www/my.example.com/htdocs
UserDir disabled
DirectoryIndex disabled
<Directory "/var/www/my.example.com/htdocs">
AllowOverride All
Options -MultiViews
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://unicorns%{REQUEST_URI} [P,QSA,L]
</VirtualHost>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment