Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python 3.12.8
python 3.12.9
nodejs 20.11.1
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM python:3.12.8-slim-bookworm
FROM --platform=$BUILDPLATFORM python:3.12.9-slim-bookworm
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH
Expand Down
31 changes: 0 additions & 31 deletions Dockerfile.python-deployment-temp-3.11-3.12

This file was deleted.

61 changes: 47 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ List of install resources used:
- <https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt>
- <https://github.com/Yelp/dumb-init?tab=readme-ov-file#option-1-installing-from-your-distros-package-repositories-debian-ubuntu-etc>

## Updating

1. Edit [./VERSION](./VERSION) to the new tag you want. Ideally matching the python version. If the only difference is another tool adding `-<tool>` works.
1. Make the changes to [./Dokcerfile](./Dockerfile) starting with the base container version for python version changes. Now is a good time to see if the linux version can be bumped up.
1. If versions of other tools that are tested change, follow [Generating the Test App](#Generating-the-Test-App) to update the test app.
1. It's also a good time to check for any other dependcency upgrades.
1. Run `./build.sh` to build the container
1. Run `./test.sh` to test the container
1. Run `./run.sh` to interactively run and inspect the container if needed.
1. Open a PR with the changes

## Release

After testing and merging the PR, run the following:

1. `git checkout main`
1. `git fetch --all`
1. `git pull --rebase upstream main`
1. Run `./release.sh` to create a release

## Local Testing

To use the build scripts, use docker buildx with multiplatform.
Expand All @@ -32,41 +52,54 @@ docker buildx create \
--driver=docker-container
```

Setup a local registry
### Setup a local registry

```bash
./local_registry.sh
```

Run the scripts
### Run the scripts

To use port 5001, you will need to edit the insecure registires in your docker daemon or use a tool like ngrok to proxy port 5001. If using ngrok, the url will be the one generated by ngrok.

```yaml
docker:
insecure-registries:
- host.docker.internal:5001
```

Use: `localhost` or `host.docker.internal`

The localdomain can't be localhost, 0.0.0.0, 127.0.0.1 or others on the insecure repository list, port is 5001.
Run docker info to see the config. Example output insecure registries section:

Use: 'host.docker.internal'
```text
Insecure Registries:
host.docker.internal:5001
127.0.0.0/8
```

Run docker info to see list.
#### Build

```bash
# ./build.sh <platforms> <localdomain:port>
./build.sh linux/arm64 host.docker.internal:5001 # to pass in a local domain, edit hostsfile
# ./build.sh linux/arm64 host.docker.internal:5001 # to pass in a local domain, edit hostsfile
./build.sh linux/arm64 localhost:5001 # insecure registry
```

If you get `http: server gave HTTP response to HTTPS client` the easy solution is to run a tool like ngrok `ngrok http 5001` and run `./build.sh linux/arm64 <ngrok_https_host>`. Replace `<ngrok_https_host>` with yours ngrok hostname ending in `.ngrok-free.app` without the protocol.

This will give you an https path locally (and externally, shutdown when done).

### Run
#### Run

```bash
# ./run.sh <localdomain:port>
./run.sh host.docker.internal:5001
# ./run.sh host.docker.internal:5001
./run.sh localhost:5001
```

### Test
#### Test

```bash
# ./build.sh <localdomain:port>
./test.sh host.docker.internal:5001
# ./test.sh host.docker.internal:5001
./test.sh localhost:5001
```

## Generating the Test App
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.12.8-buildah
3.12.9
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"generators": {
"@nxlv/python:poetry-project": {
"pyenvPythonVersion": "3.12.8",
"pyenvPythonVersion": "3.12.9",
"pyprojectPythonDependency": ">=3.12,<3.13"
}
}
Expand Down
Loading