Skip to content

Commit

Permalink
Codespaces tweaks (#558)
Browse files Browse the repository at this point in the history
* Codespaces development env can't use SSL
* Add prompt for MAPIT_API_KEY secret
* Removed deprecated vscode settings
  • Loading branch information
ajparsons authored Jun 19, 2024
1 parent ef01ffa commit f919b34
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

{
"name": "local-intelligence-hub",

"secrets": {"MAPIT_API_KEY": {
"description": "API key for the MapIt API - optional for small numbers of queries"
}},
"dockerComposeFile": ["../docker-compose.yml"],
"service": "web",
"workspaceFolder": "/app",
"overrideCommand": true,

"extensions": [
"customizations": {"vscode":{"extensions": [
"ms-vscode.test-adapter-converter",
"bungcip.better-toml",
"ms-python.python",
Expand All @@ -16,5 +17,5 @@
"ms-azuretools.vscode-docker",
"github.vscode-pull-request-github",
"mhutchie.git-graph"
]
]}}
}
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"configurations": [
{
"name": "Run debug server",
"type": "python",
"type": "debugpy",
"request": "launch",
"justMyCode": false,
"program": "${workspaceFolder}/manage.py",
Expand Down
4 changes: 0 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
"editor.defaultFormatter": "ms-python.black-formatter"
},
"black-formatter.path": ["${workspaceFolder}", "script", "black"],
"flake8.path": ["${workspaceFolder}", "script", "flake8"],
"flake8.args": [
"--exclude \".venv\" ."
],

"files.exclude": {
"**/.git": true,
Expand Down
6 changes: 5 additions & 1 deletion script/server
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ case "$ACTION" in
npm install --no-package-lock --no-audit
./script/build_js
./manage.py migrate
./manage.py runsslserver 0.0.0.0:8000
if [ "$CODESPACES" == "true" ] ; then
./manage.py runserver 0.0.0.0:8000 --insecure
else
./manage.py runsslserver 0.0.0.0:8000
fi
;;
--staging)
./manage.py migrate
Expand Down

0 comments on commit f919b34

Please sign in to comment.