-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adds CI/CD to devU #124
Adds CI/CD to devU #124
Conversation
api.Dockerfile
Outdated
COPY --from=module_builder /tmp/devu-shared-modules ./devu-shared-modules | ||
|
||
# Indicate that the api is running in docker; value here is irrelevant | ||
ENV dev=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's choose a better variable name than dev
for this. I see isDocker
below, which sounds better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about is_docker
then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging so we can test CI/CD on the develop branch
Proposed changes
Added CI/CD to the repo, it currently only builds docker files and does not run tests. It pushes the images to ghcr
Also refactored the API dockerfile mentioned #126 combining the config generation when building the image.
Disclaimer: this was already done by a previous PR #116; I only refactored it a little.
It builds the following images
with the following tags
beta
- whenever a commit is pushed todevelop
branch.latest
- whenever a commit is pushed to therelease
branch ( this branch does not yet exist; it is meant for v1.0 )versioned
-release
branch has tag 1.0, the docker image will be tagged accordingly.The docker-compose file also includes a service called watchtower; this allows it to auto-update containers when a new image tag is pushed. The current configuration checks for new images every 30s. This is a very low-cost operation, and it barely uses any resources, so it will run fine without affecting the server.
Let me know if you have a question or if I need to change the naming convention, i.e. beta -> develop or something
I also included a example compose file; remember to include tango config, when using docker-compose.
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any ofthem, don't hesitate to ask. This is simply a reminder of what we are going to look for before merging your code.