mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 01:48:21 +02:00
🎨 Apply Django migrations
This commit is contained in:
@ -12,9 +12,11 @@
|
||||
repo: https://gitlab.crans.org/bde/nk20.git
|
||||
dest: /var/www/note_kfet
|
||||
version: beta-soon
|
||||
track_submodules: yes
|
||||
force: true
|
||||
|
||||
- name: Use default env vars (should be updated!)
|
||||
command: cp /var/www/note_kfet/.env_example /var/www/note_kfet/.env
|
||||
|
||||
- name: Update permissions for note_kfet dir
|
||||
file:
|
||||
path: /var/www/note_kfet
|
||||
|
@ -17,7 +17,7 @@
|
||||
- name: Create role note
|
||||
postgresql_user:
|
||||
name: note
|
||||
password: note # Fix it!
|
||||
password: "CHANGE_ME"
|
||||
become_user: postgres
|
||||
|
||||
- name: Create NK20 database
|
||||
@ -25,3 +25,15 @@
|
||||
name: note_db
|
||||
owner: note
|
||||
become_user: postgres
|
||||
|
||||
- name: Make Django migrations
|
||||
command: /var/www/note_kfet/env/bin/python manage.py makemigrations
|
||||
args:
|
||||
chdir: /var/www/note_kfet
|
||||
become_user: www-data
|
||||
|
||||
- name: Migrate Django database
|
||||
command: /var/www/note_kfet/env/bin/python manage.py migrate
|
||||
args:
|
||||
chdir: /var/www/note_kfet
|
||||
become_user: www-data
|
||||
|
Reference in New Issue
Block a user