Closed easybe closed 2 months ago
Regarding CI, I already have an action set up for version releasing, I think we could add a build and push to docker there.
The only concerns I have is we have to figure out how to update the version in the docker compose.
Regarding CI, I already have an action set up for version releasing, I think we could add a build and push to docker there.
The only concerns I have is we have to figure out how to update the version in the docker compose.
Here is a GitHub guide on doing it using actions. I have added a DOCKER_USERNAME
and DOCKER_PASSWORD
value to the secrets for the repo, so those should be usable. This will push to the upstreamdata
docker page on docker hub.
https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
The only concerns I have is we have to figure out how to update the version in the docker compose.
Yes, that is a tricky one. It will be hard to avoid having the version in 2 places. However, the Compose file shall only serve as an example or for development. Build and push I plan to do with GitHub Actions directly.
For development, it would actually make sense to have the source mounted in instead.
Configure linter for YAML (the whole world uses 2 spaces for Docker Compose files)
I generally like to keep things consistent across the repo, meaning 4 spaces indentation for all files. I'm not strictly opposed to this for yaml files, but something we should do some deliberation about.
For reference, this is handled by prettier
, which does both HTML and YAML files. I want to keep HTML at 4 spaces, but if we wanted to handle YAML differently we would have to figure out how to in .prettierrc.yaml
.
Configure linter for YAML (the whole world uses 2 spaces for Docker Compose files)
I generally like to keep things consistent across the repo, meaning 4 spaces indentation for all files. I'm not strictly opposed to this for yaml files, but something we should do some deliberation about.
For reference, this is handled by
prettier
, which does both HTML and YAML files. I want to keep HTML at 4 spaces, but if we wanted to handle YAML differently we would have to figure out how to in.prettierrc.yaml
.
https://stackoverflow.com/questions/56464727/different-prettier-rules-for-different-file-types
Configure linter for YAML (the whole world uses 2 spaces for Docker Compose files)
I generally like to keep things consistent across the repo, meaning 4 spaces indentation for all files. I'm not strictly opposed to this for yaml files, but something we should do some deliberation about.
For reference, this is handled by
prettier
, which does both HTML and YAML files. I want to keep HTML at 4 spaces, but if we wanted to handle YAML differently we would have to figure out how to in.prettierrc.yaml
.
I get your point. I generally also use 4 spaces. However, as pretty much all YAML out there is indented with 2 spaces, my eyes got used to it, but more importantly, it makes copying & pasting from the internet easier.
I get your point. I generally also use 4 spaces. However, as pretty much all YAML out there is indented with 2 spaces, my eyes got used to it, but more importantly, it makes copying & pasting from the internet easier.
Ok, let's move forward with 2 space yaml then. I think that link I provided should be enough info to configure prettier, though it will need to be converted into yaml.
I get your point. I generally also use 4 spaces. However, as pretty much all YAML out there is indented with 2 spaces, my eyes got used to it, but more importantly, it makes copying & pasting from the internet easier.
Ok, let's move forward with 2 space yaml then. I think that link I provided should be enough info to configure prettier, though it will need to be converted into yaml.
Concerning CI, what I got so far seems to work: https://github.com/UpstreamDataInc/goosebit/actions/runs/10322906355
To test the actual push to the registry is a little bit of a challenge though, as the workflow is only meant to be run on release.
I will come up with a strategy and start getting things ready for integration.
If you only want to run on release, I use this file for release to push to PyPi- https://github.com/UpstreamDataInc/goosebit/blob/master/.github/workflows/python-publish.yml
@b-rowan I would assume that the upstreamdata/goosebit repository needs to be manually created on Docker Hub.
Ok, let me try doing that, one moment.
Ok, repo is up on docker hub :+1:
I will split this into multiple PRs. First batch: #60, #61
Use gunicorn
Here's a reference from the FastAPI docs on this, basically just run with uvicorn workers.
https://fastapi.tiangolo.com/deployment/server-workers/#gunicorn-with-uvicorn-workers
Use gunicorn
Here's a reference from the FastAPI docs on this, basically just run with uvicorn workers.
https://fastapi.tiangolo.com/deployment/server-workers/#gunicorn-with-uvicorn-workers
Yes, that is what am working on. Unfortunately, I am still struggling with getting the logger to print the format I want (and lack of time as I am also working on our internal deployment). But, I am on it. My WIP branch can be found here: https://github.com/husqvarnagroup/goosebit/tree/gardena/eb/docker_compose
Use gunicorn
Here's a reference from the FastAPI docs on this, basically just run with uvicorn workers.
https://fastapi.tiangolo.com/deployment/server-workers/#gunicorn-with-uvicorn-workers
Yes, that is what am working on. Unfortunately, I am still struggling with getting the logger to print the format I want (and lack of time as I am also working on our internal deployment). But, I am on it. My WIP branch can be found here: https://github.com/husqvarnagroup/goosebit/tree/gardena/eb/docker_compose
All good, just wanted to help out, as I figured y'all have been busy.
Closing in favor of #88 and #109
A first stab at #31 and #54.
To do:
gunicorn
This can be tested with: