From c7c8dd468dcee87d51462e70171015aa7631628b Mon Sep 17 00:00:00 2001 From: Alex Parsons Date: Wed, 19 Jun 2024 18:41:02 +0000 Subject: [PATCH] Add auto-quick-setup devcontainer setup --- .../auto-quick-setup/devcontainer.json | 22 +++++++++++++++++++ script/setup-and-import | 12 ++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .devcontainer/auto-quick-setup/devcontainer.json create mode 100755 script/setup-and-import diff --git a/.devcontainer/auto-quick-setup/devcontainer.json b/.devcontainer/auto-quick-setup/devcontainer.json new file mode 100644 index 000000000..b78c32241 --- /dev/null +++ b/.devcontainer/auto-quick-setup/devcontainer.json @@ -0,0 +1,22 @@ + +{ + "name": "local-intelligence-hub-with-data", + "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, + "onCreateCommand": "script/setup-and-import", + "customizations": {"vscode":{"extensions": [ + "ms-vscode.test-adapter-converter", + "bungcip.better-toml", + "ms-python.python", + "ms-python.vscode-pylance", + "batisteo.vscode-django", + "ms-azuretools.vscode-docker", + "github.vscode-pull-request-github", + "mhutchie.git-graph" + ]}} +} \ No newline at end of file diff --git a/script/setup-and-import b/script/setup-and-import new file mode 100755 index 000000000..9eba403e7 --- /dev/null +++ b/script/setup-and-import @@ -0,0 +1,12 @@ +#!/bin/bash + +# abort on any errors +set -e + +# check that we are in the expected directory +cd `dirname $0`/.. + +# Run the update script +./script/bootstrap +./script/manage migrate +./script/import-all-data