Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerise the CLI #11

Merged
merged 10 commits into from
Nov 8, 2023
Merged

Dockerise the CLI #11

merged 10 commits into from
Nov 8, 2023

Conversation

ghickman
Copy link
Contributor

@ghickman ghickman commented Nov 6, 2023

This wraps the CLI tool in docker ready for deployment to a dokku.

I took the job-runner configuration (which is already set up for a CLI tool) and adapted it for this repo. I've removed all the bits that I thought were job-runner specific (in particular things like where does the docker socket live on the host, SSH config, etc).

Since this is the main tool of the repo I've tried out leaving the docker config in the docker directory but moving the invocations up to the main justfile, and putting the docker-compose bits into the existing docker-compose.yaml. Can anyone think of any problems or confusion this might cause?

I've done a little tidying along the way, most notably set up a static username and db name for timescaledb, and put that configuration into the dotenv-sample which both docker and the justfile are now autoloading.

You should be able to test this with just docker-run dev python -m metrics and get the help text that just metrics gives you.

I suspect we'll have some bugs to iron out once we start running this in production but I don't know how to start testing it without merging this first.

The setuptools backend works with a single directly without
configuration.  However when we add more than one directory, which we're
about to do, it needs to be configured to know where to find the code we
want to package.
We're not using this entrypoint, and it was incorrectly added with the
add_job name, after copy/pasting from job-runner.
@ghickman ghickman force-pushed the docker branch 8 times, most recently from 3df1856 to ef8f6b5 Compare November 7, 2023 12:21
@ghickman ghickman marked this pull request as ready for review November 7, 2023 13:03
We're using specific names for all the other configuration env vars, and
have multiple databases involved with this project, so lets make it
clear which database this URL is for.
So we can rely on it in local configuration.
We have multiple things which need running in this project, so lets name
them clearly.
.github/workflows/main.yml Outdated Show resolved Hide resolved
docker-compose.yaml Outdated Show resolved Hide resolved
docker/Dockerfile Outdated Show resolved Hide resolved
docker-compose.yaml Outdated Show resolved Hide resolved
docker-compose.yaml Outdated Show resolved Hide resolved
docker/Dockerfile Outdated Show resolved Hide resolved
@ghickman ghickman force-pushed the docker branch 2 times, most recently from 3d86b4c to d8da023 Compare November 8, 2023 09:23
.github/workflows/main.yml Outdated Show resolved Hide resolved
We switched to using pyproject.toml for this project in fc2050f but this
file was missed as part of that.  Nothing is configured to use it so
it's just a plain deletion.
The former invokes the docker plugin instead of the standalone tool,
allowing us to target compose v2 more consistently.
@ghickman ghickman merged commit 0c6ab02 into main Nov 8, 2023
7 checks passed
@ghickman ghickman deleted the docker branch November 8, 2023 11:05
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.

2 participants