2022-08-09 06:06:32 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-05-12 07:13:48 +00:00
|
|
|
# Avoiding Dubious Ownership in Dev Containers for setup commands that use git
|
2024-02-28 04:04:14 +00:00
|
|
|
git config --global --add safe.directory /home/inventree
|
2022-08-09 06:06:32 +00:00
|
|
|
|
|
|
|
# create venv
|
2024-02-28 04:04:14 +00:00
|
|
|
python3 -m venv /home/inventree/dev/venv --system-site-packages --upgrade-deps
|
|
|
|
. /home/inventree/dev/venv/bin/activate
|
2022-08-09 06:06:32 +00:00
|
|
|
|
2024-03-01 05:53:42 +00:00
|
|
|
# Run initial InvenTree server setup
|
2024-02-28 04:04:14 +00:00
|
|
|
invoke update -s
|
2024-03-01 05:53:42 +00:00
|
|
|
|
|
|
|
# Configure dev environment
|
2023-05-12 07:13:48 +00:00
|
|
|
invoke setup-dev
|
2024-03-01 05:53:42 +00:00
|
|
|
|
|
|
|
# Install required frontend packages
|
2023-07-18 12:45:49 +00:00
|
|
|
invoke frontend-install
|
2023-05-05 12:34:42 +00:00
|
|
|
|
|
|
|
# remove existing gitconfig created by "Avoiding Dubious Ownership" step
|
2023-05-12 07:13:48 +00:00
|
|
|
# so that it gets copied from host to the container to have your global
|
2023-05-05 12:34:42 +00:00
|
|
|
# git config in container
|
|
|
|
rm -f /home/vscode/.gitconfig
|