2021-10-29 16:05:25 +00:00
|
|
|
tasks:
|
|
|
|
- name: Setup django
|
2021-10-29 16:23:27 +00:00
|
|
|
before: |
|
2021-10-29 16:05:25 +00:00
|
|
|
export INVENTREE_DB_ENGINE='sqlite3'
|
|
|
|
export INVENTREE_DB_NAME='/workspace/InvenTree/dev/database.sqlite3'
|
2021-10-29 16:23:27 +00:00
|
|
|
export INVENTREE_MEDIA_ROOT='/workspace/InvenTree/inventree-data/media'
|
2021-10-29 16:05:25 +00:00
|
|
|
export INVENTREE_STATIC_ROOT='/workspace/InvenTree/dev/static'
|
|
|
|
export PIP_USER='no'
|
|
|
|
|
|
|
|
python3 -m venv venv
|
|
|
|
source venv/bin/activate
|
|
|
|
pip install invoke
|
|
|
|
inv install
|
|
|
|
mkdir dev
|
|
|
|
inv update
|
|
|
|
gp sync-done setup_server
|
|
|
|
|
|
|
|
- name: Start server
|
2021-10-29 16:23:27 +00:00
|
|
|
init: gp sync-await setup_server
|
2021-10-29 16:05:25 +00:00
|
|
|
command: |
|
|
|
|
gp sync-await setup_server
|
|
|
|
export INVENTREE_DB_ENGINE='sqlite3'
|
|
|
|
export INVENTREE_DB_NAME='/workspace/InvenTree/dev/database.sqlite3'
|
2021-10-29 16:23:27 +00:00
|
|
|
export INVENTREE_MEDIA_ROOT='/workspace/InvenTree/inventree-data/media'
|
2021-10-29 16:05:25 +00:00
|
|
|
export INVENTREE_STATIC_ROOT='/workspace/InvenTree/dev/static'
|
|
|
|
|
|
|
|
source venv/bin/activate
|
2021-10-29 23:27:31 +00:00
|
|
|
rm /workspace/InvenTree/inventree-data -r
|
|
|
|
git clone https://github.com/inventree/demo-dataset /workspace/InvenTree/inventree-data
|
|
|
|
invoke delete-data -f
|
|
|
|
invoke import-records -f /workspace/InvenTree/inventree-data/inventree_data.json
|
|
|
|
|
2021-10-29 16:05:25 +00:00
|
|
|
inv server
|
|
|
|
|
|
|
|
# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/
|
|
|
|
ports:
|
|
|
|
- port: 8000
|
|
|
|
onOpen: open-preview
|
|
|
|
|
|
|
|
github:
|
|
|
|
prebuilds:
|
|
|
|
master: true
|
|
|
|
pullRequests: false
|
|
|
|
pullRequestsFromForks: true
|
|
|
|
addBadge: true
|
|
|
|
addLabel: gitpod-ready
|
2021-10-29 16:23:27 +00:00
|
|
|
addCheck: false
|