This commit is contained in:
Matthias Mair 2021-10-28 22:25:42 +00:00
parent c1a396a4ec
commit df1335746d

View File

@ -3,8 +3,8 @@ 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_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'
@ -16,24 +16,17 @@ tasks:
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
env:
INVENTREE_DB_ENGINE: 'sqlite3'
INVENTREE_DB_NAME: '/workspace/data/database.sqlite3'
INVENTREE_MEDIA_ROOT: '/workspace/data/media'
INVENTREE_STATIC_ROOT: '/workspace/data/static'
PIP_USER: 'no'
- 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
env:
INVENTREE_DB_ENGINE: 'sqlite3'
INVENTREE_DB_NAME: '/workspace/data/database.sqlite3'
INVENTREE_MEDIA_ROOT: '/workspace/data/media'
INVENTREE_STATIC_ROOT: '/workspace/data/static'
PIP_USER: 'no'
# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/
ports: