mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 12:36:45 +00:00
Gitpod (#22)
* 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
This commit is contained in:
parent
5cd9be6845
commit
59951a12e2
42
.gitpod.yml
Normal file
42
.gitpod.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
|
||||||
|
tasks:
|
||||||
|
- name: Setup django
|
||||||
|
init: |
|
||||||
|
export INVENTREE_DB_ENGINE='sqlite3'
|
||||||
|
export INVENTREE_DB_NAME='/workspace/InvenTree/dev/database.sqlite3'
|
||||||
|
export INVENTREE_MEDIA_ROOT='/workspace/InvenTree/dev/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
|
||||||
|
echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'test@test.com', 'inventree')" | python InvenTree/manage.py shell
|
||||||
|
gp sync-done setup_server
|
||||||
|
|
||||||
|
- name: Start 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/dev/media'
|
||||||
|
export INVENTREE_STATIC_ROOT='/workspace/InvenTree/dev/static'
|
||||||
|
|
||||||
|
source venv/bin/activate
|
||||||
|
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
|
Loading…
x
Reference in New Issue
Block a user