Managing projects
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.4 KiB

How to Install a Discourse Plugin for Events

1. Create a new discourse installation for testing

  1. Initialize a new discourse site:

    ds init discourse @forum1.flossk.org
    cd /var/ds/forum1.flossk.org/
    
  2. Copy settings.sh from the original site, but change DOMAIN to the new one (forum1.flossk.org):

    cp ../forum.flossk.org/settings.sh .
    vim settings.sh
    
  3. Make the container:

    cd /var/ds/forum1.flossk.org
    ds make
    

    (It may take a few minutes.)

2. Take a backup from the original site and restore it on the test site

cd /var/ds/forum.flossk.org/
ds backup
ls backup/

mkdir -p ../forum1.flossk.org/backup/
cp backup/flossk-2020-07-10-171654-v20200710013237.tar.gz \
   ../forum1.flossk.org/backup/
cd ../forum1.flossk.org/
ds restore backup/flossk-2020-07-10-171654-v20200710013237.tar.gz

Note: For some reason it does not work for the first time. Try it a second time:

ds restore backup/flossk-2020-07-10-171654-v20200710013237.tar.gz

Now we can open the test site https://forum1.flossk.org and login as admin.

3. Install the plugin on the test site

Instructions on: https://meta.discourse.org/t/discourse-event/149964

  1. Add git clone https://github.com/discourse/discourse-calendar.git on the hooks section:

    cd /var/ds/forum1.flossk.org/
    cd discourse_docker/
    ls containers/
    vim containers/forum.flossk.org.yml
    

    It should look like this:

    ## 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
              - git clone https://github.com/discourse/discourse-calendar.git
    
  2. Rebuild the discourse container:

    cd /var/ds/forum1.flossk.org/
    cd discourse_docker/
    ls containers/
    ./launcher rebuild forum1.flossk.org
    
  3. Login as admin and enable the settings calendar_enabled and discourse_post_event_enabled.

  4. Try to post a new topic, then click on the gear icon and create an event

4. Clean up the test site

After testing is done, clean up the test site:

cd /var/ds/forum1.flossk.org/
ds remove
cd ..
rm -rf forum1.flossk.org/

5. Install the plugin on the real site

Follow the steps on the section above, as described on: https://meta.discourse.org/t/discourse-event/149964