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

Sho/docker #86

Merged
merged 63 commits into from
Jun 25, 2024
Merged

Sho/docker #86

merged 63 commits into from
Jun 25, 2024

Conversation

shocau
Copy link
Contributor

@shocau shocau commented Jun 25, 2024

Merge in and adapt Docker and docker-compose files from production environment, preserving history.

arl and others added 30 commits July 17, 2020 13:49
Using docker-compose's feature to check wether the server is still
running from inside the container.
Since the process inside the container eats up all the server resources
and we don't know why, limiting the available resources to mitigate the
problem seems a legit idea.
The container might use half a CPU and 512 MB of memory.
Avoiding local cache data as well.
shocau and others added 27 commits June 4, 2024 12:52
No need to copy docker-compose.yml into Docker image.
There was a git command-line call when yarn builds webpack components of
the client.
This fails in some build environemnts (e.g. Github build actions or
standard Docker builds) when no .git/ folder is found in project root.
We already have a version information declared in package.json for NPM
description. Use it to render in web pages instead of hard coded string
or plain git commit hash.
Later on, the version information might get bumped when building
releases and reused to set tags in git and to Docker images.
When a commit hash is provided via GitHub's build action environment
variable it's concatinated to the version string rendered to web pages.
Group ID of non-privileged user can now also be passed from outside via
Docker argument. This is beneficial when binding your work directory to
actively develop the app using a running container instance.
By setting matching file permission inside container environment you
avoid mixing up file permission between both sides of the mounted
folder.
Defaulting to dynamically assigned host port which eases starting
multiple container (instances).
Add an environment option to specify host port explicitly, e.g. for
production environment.
Forcing the user to copy the file and activate relevant lines by
removing leading hash character.
Some build time dependency caches that should be ignored from version
control and from being copied back into container image as well.
Comment out volumes section to leave it as option for local development.
This is the default UID:GID mapping now as the previously hard-coded
values of 1002:1002 where used in production system, only.
When building locally a 'latest' tag is added to each new image. As it
seems, this is done automatically only for tagged releases in GitHub
Actions.
Let's try setting this tag explicitly as it's the default tag for a
image specification when no other is given.
Copy link
Contributor

@Eddykasp Eddykasp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Eddykasp Eddykasp merged commit 21310c6 into master Jun 25, 2024
2 checks passed
@Eddykasp Eddykasp deleted the sho/docker branch June 25, 2024 12:36
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.

4 participants