Browse Source

forum: simplify getting the tagged release

https://meta.discourse.org/t/how-to-i-can-install-old-version-discourse/115457/8?u=dachary
keep-around/ff2bac15f0fe70d564047674b9d3899baf4c1631
Loïc Dachary 7 months ago
committed by some
parent
commit
ff2bac15f0
Signed by: dachary GPG Key ID: 992D23B392F9E4F2
  1. 6
      playbooks/forum/roles/discourse/tasks/main.yml
  2. 7
      playbooks/forum/roles/discourse/templates/app.yml.j2
  3. 9
      playbooks/forum/roles/discourse/templates/version.template.yml.j2

6
playbooks/forum/roles/discourse/tasks/main.yml

@ -20,12 +20,6 @@
dest: "/srv/forum/{{ forum_name }}"
become: false
- name: workaround https://meta.discourse.org/t/shallow-git-fetch-regression-in-discourse-docker/172324/16
template:
src: "templates/version.template.yml.j2"
dest: "/srv/forum/{{ forum_name }}/templates/version.template.yml"
become: false
- name: deploy configuration
template:
src: "templates/app.yml.j2"

7
playbooks/forum/roles/discourse/templates/app.yml.j2

@ -1,7 +1,6 @@
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/version.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
# - "templates/web.ssl.template.yml"
@ -13,7 +12,6 @@ expose:
params:
db_default_text_search_config: "pg_catalog.english"
version: {{ forum_discourse_version }}
env:
LANG: en_US.UTF-8
@ -65,6 +63,11 @@ hooks:
{% for plugin in forum_plugins %}
- git clone {{ plugin.url }} {{ plugin.name }} ; cd {{ plugin.name }} ; git checkout {{ plugin.hash }}
{% endfor %}
- exec:
cd: $home
cmd:
- git fetch --depth=1 origin tag {{ forum_discourse_version }} --no-tags
- git checkout {{ forum_discourse_version }}
## Any custom commands to run after building
run:

9
playbooks/forum/roles/discourse/templates/version.template.yml.j2

@ -1,9 +0,0 @@
params:
home: /var/www/discourse
run:
- exec:
cd: $home
hook: code
cmd:
- git fetch --tags
Loading…
Cancel
Save