Pack the serivce into docker image#341
Conversation
provide a docker image
add github action to push to dockerhub
|
Hi @duchenpaul! As I don't personally use and also could not support docker: Do you want to maintain / support docker for the bepasty project? I'm sure some users might have questions or the code might need future changes or fixes. Cheers, Thomas |
|
Also: is this superseding #262? |
Yes, I would like to support and maintain the docker aspect of this project. If you don't use docker, I will remove the dockerhub part as that would need your dockerhub account to deploy the images. And for your another question, that would also be yes. |
|
I removed the part that upload to dockerhub. |
ThomasWaldmann
left a comment
There was a problem hiding this comment.
thanks for the PR, here some stuff i found...
.github/workflows/docker_images.yml
Outdated
| file: ./docker/Dockerfile | ||
| push: true | ||
| tags: | | ||
| ghcr.io/${{ github.repository }}:1.2.2 |
There was a problem hiding this comment.
hardcoded version number.
| @@ -0,0 +1,41 @@ | |||
| #!/usr/bin/python | |||
There was a problem hiding this comment.
Is this needed?
It seems to check bepasty configuration (which bepasty itself also does).
It has hardcoded defaults that may or may not be in sync with bepasty's internal defaults.
It adds new settings that (IIRC) bepasty does not have, like BEPASTY_ADMIN_SECRET.
|
|
||
| * For a more advanced configuration mount a custom configuration to | ||
| `/etc/bepasty.conf`. | ||
| * All data will be owned by UID 117356, to change this you can use the |
There was a problem hiding this comment.
below you use 17357? note the 2 differences in the uid.
.gitignore
Outdated
| docs/build/ | ||
|
|
||
| .idea | ||
| .vscode/settings.json |
There was a problem hiding this comment.
maybe exclude the whole .vscode?
pyproject.toml
Outdated
| authors = [{ name = "The Bepasty Team (see AUTHORS file)" }] | ||
| maintainers = [{ name = "Thomas Waldmann", email = "tw@waldmann-edv.de" }] | ||
| description = "A binary pastebin and file upload service" | ||
| readme = "README.rst" | ||
| keywords = ["text", "image", "audio", "video", "binary", "pastebin", "upload", "download", "service", "wsgi", "flask"] | ||
| keywords = [ | ||
| "text", | ||
| "image", | ||
| "audio", | ||
| "video", | ||
| "binary", | ||
| "pastebin", | ||
| "upload", | ||
| "download", | ||
| "service", |
There was a problem hiding this comment.
i would appreciate if you do not mix functional changes with code reformatting.
pyproject.toml
Outdated
| max-line-length = 120 | ||
|
|
||
| [tool.bumpver] | ||
| current_version = "1.3.0" |
There was a problem hiding this comment.
hardcoded version number
pyproject.toml
Outdated
|
|
||
| [tool.bumpver.file_patterns] | ||
| "pyproject.toml" = ['current_version = "{version}"'] | ||
| "src/bepasty/__init__.py" = ['__version__ = "{version}"'] |
There was a problem hiding this comment.
we use setuptools_scm to manage automatic versioning based on git tags.
pyproject.toml
Outdated
| "pyproject.toml" = ['current_version = "{version}"'] | ||
| "src/bepasty/__init__.py" = ['__version__ = "{version}"'] | ||
| ".github/workflows/docker_images.yml" = [ | ||
| 'duchenpaul/bepasty:{version}', |
| { | ||
| "ansible.python.interpreterPath": "c:\\Python312\\python.exe" | ||
| } |
There was a problem hiding this comment.
don't commit your vscode config.
Also add pipeline to push to dockerhub and ghcr