2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00
InvenTree/.devcontainer/postCreateCommand.sh
Matthias Mair e75ceb0719
fix(contrib): Invoke Path Issues (#8979)
* fix Invoke Path Issues
Fixes #8827

* quick exit for docker envs

* also exclude rtd enviroment

* implement suggested fix for devcontainer

* always install
2025-01-30 22:16:16 +11:00

26 lines
740 B
Bash
Executable File

#!/bin/bash
# Avoiding Dubious Ownership in Dev Containers for setup commands that use git
git config --global --add safe.directory /home/inventree
# create venv
python3 -m venv /home/inventree/dev/venv --system-site-packages --upgrade-deps
. /home/inventree/dev/venv/bin/activate
# Ensure the correct invoke is available
pip3 install invoke --ignore-installed -U
# Run initial InvenTree server setup
invoke update -s
# Configure dev environment
invoke dev.setup-dev
# Install required frontend packages
invoke int.frontend-install
# remove existing gitconfig created by "Avoiding Dubious Ownership" step
# so that it gets copied from host to the container to have your global
# git config in container
rm -f /home/vscode/.gitconfig