From e8427199a259eeb18bb15c090153965872ef477f Mon Sep 17 00:00:00 2001 From: Alex Parsons Date: Thu, 7 Jul 2022 13:51:28 +0000 Subject: [PATCH] Updated readme to reflect new codespaces config --- README.md | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 33cdc99d7..ffe45d137 100755 --- a/README.md +++ b/README.md @@ -50,29 +50,14 @@ In your [Github Codespaces settings](https://github.com/settings/codespaces), se Then in the [caps repo](https://github.com/mysociety/caps/), click the code dropdown (top right), and select the codespaces tab, then create new codespace. -Once it has cloned and set up the docker configuration (it may prompt you to reload with the pylance extension, this is fine and takea a few seconds). You have two options: +Once it has cloned and set up the docker configuration (it may prompt you to reload with the pylance extension, this is fine and takea a few seconds), you should have a set-up populated a recent version of the current data process. -To run the data population from scratch run `script/setup-in-docker` (as warned above, this takes a while). -To restore a previous database dump, run `script/quick-setup`. +If you have used one of the devcontainer options that doesn't use this repopulation: -Once this is finished `script/server` will run the test server. You can access this by right clicking the `0.0.0.0:8000` link in the terminal, or follow the links in the ports page (where it can also be made public/shared to organisation). - -#### Changes to docker image - -The development docker image used by vscode/codespaces is based on a prebuilt version of the main Dockerfile to save start-up time. - -This means some adjustments are necessary when a change to the branch involves a change to the base image (e.g. new packages or changed version). - -In this event, commit the changes that affect the image to the branch, and go to [the workflow page](https://github.com/mysociety/caps/actions/workflows/main.yml) that can create a new image. - -In this page click run workflow, and use the workflow from your new branch. - -This will build the docker image and tag it with the name of the your branch. This will appear in the [package page](https://github.com/mysociety/caps/pkgs/container/caps) when ready. If the build fails, the details are in the actions tab. - -Now, in the `Dockerfile.dev` file (which is the one used by the development environment), adjust the name of the image pulled in the FROM command from 'master' to the branch name. - -New instances will then be referencing the changes made. When merging back into 'master' you can remove this, but technically it shouldn't matter (this image will be 'good' until a new branch that amends the dockerfile comes along). +* To run the data population from scratch run `script/setup-in-docker` (as warned above, this takes a while). +* To restore a previous database dump, run `script/restore-dev-data`. +Once this is finished `script/server` will run the test server. You can access this by right clicking the `0.0.0.0:8000` link in the terminal, or follow the links in the ports page (where it can also be made public/shared to organisation). ## Vagrant