Added django-contrib-comments

This commit is contained in:
Oleg Lavrovsky 2020-05-16 18:44:51 +02:00
parent f262c526ce
commit d799a05c78
7 changed files with 51 additions and 18 deletions

View file

@ -38,18 +38,20 @@ apply-migrations: migrations migrate
setup:
docker-compose exec web ./manage.py migrate
docker-compose exec web ./manage.py createsuperuser --username admin --email $(EMAIL) --noinput
docker-compose exec web ./manage.py compress
docker-compose exec web ./manage.py collectstatic --noinput
release:
rebuild:
docker-compose pull
sudo docker-compose build web
docker-compose build web --no-cache
docker-compose stop web
docker-compose kill web
docker-compose up -d web
compress:
docker-compose exec web ./manage.py collectstatic --noinput -i media
docker-compose exec web ./manage.py compress
release: rebuild compress
reindex:
docker-compose exec web ./manage.py update_index

View file

@ -21,6 +21,7 @@ django-el-pagination = "*"
django-libsass = "*"
django-redis = "*"
django-social-share = "*"
django-contrib-comments = "*"
elasticsearch = ">=5.0.0,<6.0.0"
guess_language-spirit = "*"
gunicorn = "*"

View file

@ -1,9 +1,42 @@
---
- name: Install packages based on package.json.
- name: Install JavaScript Yarn
become: true
npm:
name: yarn
global: true
- name: Link the Yarn executable
become: true
file:
src: "/usr/local/lib/npm/bin/yarn"
dest: "/usr/local/bin/yarn"
state: link
- name: Install JavaScript Grunt
become: true
yarn:
name: grunt-cli
global: true
- name: Link the Grunt executable
become: true
file:
src: "/usr/local/lib/npm/bin/grunt"
dest: "/usr/local/bin/grunt"
state: link
- name: Install JavaScript packages with Yarn
yarn:
path: "{{ release_dir }}"
- name: Install packages based on bower.json.
bower:
path: "{{ release_dir }}"
- name: Link the old bower component to libs
file:
src: "{{ release_dir }}/node_modules/@bower_components"
dest: "{{ release_dir }}/publichealth/static/libs"
state: link
- name: Compile JavaScript sources with Grunt
shell: grunt
args:
chdir: "{{ release_dir }}"

View file

@ -31,9 +31,8 @@
args:
chdir: "{{ release_dir }}"
- name: Finish setup of Wagtail site
shell: make setup
- name: Prepare compress frontend
shell: make compress
args:
chdir: "{{ release_dir }}"

View file

@ -3,14 +3,10 @@
- include: install.yaml
tags:
- install
- docker
- setup
- include: frontend.yaml
tags:
- frontend
- nodejs
- setup
- include: release.yaml
tags:

View file

@ -12,6 +12,7 @@
src: docker-compose.j2
dest: "{{ release_dir }}/docker-compose.yml"
- name: Update Docker site
debug:
msg: "Please run 'make release' in {{ release_dir }} to finish updating the site"
- name: Rebuild and release Wagtail site
shell: make release
args:
chdir: "{{ release_dir }}"

View file

@ -22,6 +22,7 @@ django-crispy-forms==1.9.0
django-el-pagination==3.3.0
django-libsass==0.8
django-social-share==1.4.0
django-contrib-comments==1.9.2
libsass==0.20.0
Pillow==7.1.2