Open just5ky opened 1 year ago
Hey, looks good! Let me know when this is ready to merge. Also If possible, squash commits like "test fix 1".
I'm not familiar with all the actions you used so if you could clarify a couple of things before I merge:
No rush, implement all your changes before answering
I based this commit thinking you were building the container from DOCKERFILE, but after I created the pull request I noticed that you are using docker-compose.yml to build it, by passing some more commands in the compose file. Now i have to redo the CI file. xD
test fix 1
docker buildx
overmindtech/buildkit-cache-dance
because you are using ghcr.io and not docker hub to store the container.
main
then the container tag will be aleksilassila/reiverr:main
Okay, gotcha
When it comes to the tags, I think it would be best to have the :latest tag as a convention, as well as the release tag (e.g. v0.3.0) name for now. It makes it more intuitive for people to choose between the latest release and a specific one. Lmk if you run into issues regarding that or if you have any suggestions.
@aleksilassila can you explain to me why you are building using docker compose
instead of docker build
or docker buildx build
I'm a confused why there are two different sections in Dockerfile and two compose file.
Why is the development section needed for production build?
@aleksilassila can you explain to me why you are building using
docker compose
instead ofdocker build
ordocker buildx build
The multiple docker-compose files are there to make docker-compose up
build the development environment by targetting the development stage of the dockerfile and docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
the production environment by targetting the production stage respectively. The different stages in Dockerfile allow for a) having only one dockerfile for multiple environments and b) smaller production imgage sizes since pre-production
stage gets discarded except the build/ directory.
Using docker compose build is probably unnecessary, however. I just used it to easily reuse the values in docker-compose files (container_name, image, target build stage etc). I assume you can pass those with the docker build command.
It would be better to separate out the dockerfiles for dev and prod Thats what was causing me to end up with development env. In the final container. And its also not possible to use buildx with docker compose for multiarch builds
It would be better to separate out the dockerfiles for dev and prod Thats what was causing me to end up with development env. In the final container. And its also not possible to use buildx with docker compose for multiarch builds
If you're not using the docker compose, you'll need to specify the build stage with flags, for example docker build --target production
. Does that work with buildx? It seems like at least they have also the --target flag.
https://docs.docker.com/build/building/multi-stage/
https://docs.docker.com/engine/reference/commandline/buildx_build/
I think it would I'll give it a try later today.
okay, so I got it to work with buildx and build a multiarch image. https://github.com/just5ky/reiverr/pkgs/container/reiverr but i am not able to tag it with version. Did you have to create a release first manually, i.e, like v0.4.0 for it to take that as tag
The way it works currently is I'll run npm version minor/major/patch. It will bump package.json version, create a release commit and add the version number as a tag to that commit. Then I'll push the the tag (and the commit). Every tag that is pushed and that starts with "v" triggers the build.yml. The tag name is extracted from ${{ github.ref_name }}.
name: Build & Deploy
on:
push:
tags:
- v*
# ...
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
TAG: ${{ github.ref_name }}
okay i see, then i think i got everything working
I will double-check the code and redo the pull request, from the master branch of my fork.
Whoops, let me know when this is ready for merge
Out on vacation, will be back in a few days.
Are there any updates on this..? Really looking forward to test Reiverr on my ARM server!
@rflrkn i stopped working on it after Alex posted about project state https://github.com/aleksilassila/reiverr?tab=readme-ov-file#state-of-the-project-%EF%B8%8F
Ah, didn't see that. Thanks!
Do Not merge this yet. I overlooked that you were building from
docker-compose.yml
file instead of DOCKERFILE.Multiple Updates
NEEDS TESTING
#41[x] Added
Workflow Dispatch
to manually trigger CI.BREAKING CHANGE TO CI
main
GIT_TOKEN
fromGITHUB_TOKEN
P.S.
Reiverr
is amazing, still needs a lot of improvements, but I'm sure it will get there.