InvenTree/.gitpod.yml
Matthias Mair 6a21541566
get inventree-data at startup (#26)
* Gitpod (#25)

* Create .gitpod.yml

* split up command

* monolythic may be better

* set envs per export

* use dev for data

* trying the split again

* added sync command

* cleanup

* Update .gitpod.yml

settings for prebuilds

* add dataset import

* remove check - might block PRs

* switch execution flow

* do not block in execution

* for deletion in script

* Update .gitpod.yml

added in github RSA fingerprint

* Update .gitpod.yml

update key format

* Update .gitpod.yml

maybe https will work?

* Update .gitpod.yml

move dataset-update into init

* Update .gitpod.yml

a dir needs a -r flag :-)
2021-10-30 01:27:31 +02:00

48 lines
1.4 KiB
YAML

tasks:
- name: Setup django
before: |
export INVENTREE_DB_ENGINE='sqlite3'
export INVENTREE_DB_NAME='/workspace/InvenTree/dev/database.sqlite3'
export INVENTREE_MEDIA_ROOT='/workspace/InvenTree/inventree-data/media'
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
init: gp sync-await setup_server
command: |
gp sync-await setup_server
export INVENTREE_DB_ENGINE='sqlite3'
export INVENTREE_DB_NAME='/workspace/InvenTree/dev/database.sqlite3'
export INVENTREE_MEDIA_ROOT='/workspace/InvenTree/inventree-data/media'
export INVENTREE_STATIC_ROOT='/workspace/InvenTree/dev/static'
source venv/bin/activate
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
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
addCheck: false