Skip to content

Conversation

@rw251
Copy link
Contributor

@rw251 rw251 commented Jul 17, 2025

Based on the work by @StevenMaude here.

If you check out this branch you can simulate deploying production builds locally.

Full instructions in LOCAL_TEST_DEPLOYMENT.md.

It still needs tidying up before merging, but works as-is.

Possible improvements:

  • It currently doesn't create any coding_system databases, so although the web app starts, you can only view a couple of pages without throwing errors
  • It works locally in VSCode, but sometimes there are db permission errors when run in codespaces that I haven't investigated.
  • It's perhaps abusing the intent of devcontainers. An alternative would be to do this just with docker, and without using the devcontainer feature.
  • The local-ci-pipeline.sh script doesn't work when deploying a remote branch. This is because it relies on things in the justfile in this branch, but when deploying a remote branch it uses the justfile from that branch.

StevenMaude and others added 4 commits July 17, 2025 15:48
- sets up a dev container that works in vscode dev containers and github codespaces
- calls `local-deploy.sh` on start up to deploy opencodelists to an instance of dokku in a container
- also deploys an otel-collector container so the trace messages have somewhere to go rather than filling the docker logs with http failures
- Runs most of the commands from main.yml
- Needs to run the app on a different port (7001) for the smoke test because the local dokku instance is already using 7000
- This allows you to make changes to things like the Procfile or Dockerfile and then test the redeployment process.
- Supports passing a branch name so you can test deploy any remote branch
- All local sqlite files were being bundled in the docker image
- This was making the image 32GB and took ages
- Ignoring them reduces the image to < 0.5GB
@rw251
Copy link
Contributor Author

rw251 commented Aug 1, 2025

This has been superseded by #2774. When that is merged this can be closed.

@lucyb
Copy link
Contributor

lucyb commented Nov 10, 2025

Closing as I don't think we need this older version of the proposed change any more.

@lucyb lucyb closed this Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants