misc: improve devcontainer environment setup

- Legacy-Id: 19481
This commit is contained in:
nick 2021-10-27 20:42:03 +00:00
parent fe502da612
commit 9c903f1b01
4 changed files with 7 additions and 14 deletions

View file

@ -10,6 +10,7 @@
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh",
"python.pythonPath": "/usr/local/bin/python",
"python.languageServer": "Pylance",
"python.linting.enabled": true,
@ -35,6 +36,7 @@
"-p",
"test*.py"
]
// "python.envFile": "${workspaceFolder}/.devcontainer/dev.env"
},
// Add the IDs of extensions you want installed when the container is created.
@ -46,11 +48,10 @@
"redhat.vscode-yaml",
"visualstudioexptteam.vscodeintellicode",
"batisteo.vscode-django",
"littlefoxteam.vscode-python-test-adapter"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8000, 3306],
"forwardPorts": [8000, 3306]
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "sh /docker-init.sh",

View file

@ -29,6 +29,7 @@ services:
UID: 1001
GID: 1001
DATADIR: data
# DJANGO_SETTINGS_MODULE: settings_sqlitetest
# Uncomment the next line to use a non-root user for all processes.
# user: vscode

View file

@ -75,7 +75,7 @@ if [ ! -f $VIRTDIR/bin/activate ]; then
# datatracker virtual python environment on docker container entry:
" >> /etc/bash.bashrc
cat $VIRTDIR/bin/activate >> /etc/bash.bashrc
cat /usr/local/share/datatracker/setprompt >> /etc/bash.bashrc
cat /usr/local/share/datatracker/docker/setprompt >> /etc/bash.bashrc
else
echo "Using virtual environment at $VIRTDIR"
fi
@ -151,6 +151,8 @@ fi
HOME=/opt/home/$USER
/usr/local/bin/python $WORKSPACEDIR/ietf/manage.py check --settings=settings_local
# su -p $USER
exec "$@"

11
.vscode/settings.json vendored
View file

@ -1,11 +0,0 @@
{
"python.testing.unittestArgs": [
"-v",
"-s",
"./ietf",
"-p",
"test*.py"
],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": true
}