mirror of https://github.com/fspc/workstand.git
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.
44 lines
1.4 KiB
44 lines
1.4 KiB
---
|
|
- name: upload code
|
|
action: synchronize src=../bikeshop_project/ dest={{ app_dir }} delete=yes
|
|
notify: restart supervisor
|
|
tags:
|
|
- deploy
|
|
|
|
- name: user owns directory
|
|
action: file path={{ app_dir }} owner={{ app_name }} state=directory recurse=yes
|
|
tags:
|
|
- deploy
|
|
|
|
- name: migrate registration app
|
|
action: django_manage command="migrate registration" app_path={{ app_dir }} virtualenv={{ venv }} settings={{ settings_module }}
|
|
environment:
|
|
DJANGO_DB_PASSWORD: "{{ db_user_password }}"
|
|
DJANGO_SECRET_KEY: "{{ django_key }}"
|
|
tags:
|
|
- deploy
|
|
|
|
- name: migrate everything else
|
|
action: django_manage command=migrate app_path={{ app_dir }} virtualenv={{ venv }} settings={{ settings_module }}
|
|
environment:
|
|
DJANGO_DB_PASSWORD: "{{ db_user_password }}"
|
|
DJANGO_SECRET_KEY: "{{ django_key }}"
|
|
tags:
|
|
- deploy
|
|
|
|
|
|
- name: collect static
|
|
action: django_manage command=collectstatic app_path={{ app_dir }} virtualenv={{ venv }} settings={{ settings_module }}
|
|
environment:
|
|
DJANGO_DB_PASSWORD: "{{ db_user_password }}"
|
|
DJANGO_SECRET_KEY: "{{ django_key }}"
|
|
tags:
|
|
- deploy
|
|
|
|
- name: load initial data in to database
|
|
action: django_manage command=loaddata fixtures=authentication/fixtures/initial_data.json app_path={{ app_dir }} virtualenv={{ venv }} settings={{ settings_module }}
|
|
environment:
|
|
DJANGO_DB_PASSWORD: "{{ db_user_password }}"
|
|
DJANGO_SECRET_KEY: "{{ django_key }}"
|
|
tags:
|
|
- deploy
|
|
|