Conversation
Introduces Dockerfile.client and Dockerfile.server for building client and server images with dynamic build metadata. Adds a Makefile to automate Docker builds, passing Git and date information as build arguments for reproducible and informative images.
missing tsconfig
|
Thanks for this PR. I have a few questions for you. Actually the production is using the docker compose stack, and on each server, we start a part of the stack. I don't remember how we have handle the web server that is on the front of the application. About your code :
|
- move docker related file inside docker folder - create a c2dh folder inside the docker folder - fix server compilation so build folder is autonomus (see schema.graphql file and tsconfig) - adding healtih endpoint on the server
|
@danieleguido I did some work on top of your PR. |
|
Hi @sim51
We currently use the Docker Compose file not only for orchestration but also as a form of documentation: it makes environment variables and service configuration transparent to other team members (and we only need one general documentation...).
Regarding the Dockerfiles, we intentionally avoid using .dockerignore and prefer listing relevant files explicitly. That’s why the Dockerfiles are located within the client and server directories, and this placement ensures both that the build context includes the necessary files and that image rebuilds are triggered whenever the Dockerfile changes. The main goal is maintainability and quick readability, following the same structure used across our other projects, so contributors can recognize the pattern immediately. Concerning the web server, you have it already defined in the docker/docker-compose.yml: letterbox:
image: nginx:${NGINX_VERSION}Our usual approach is to share a volume between the letterbox-client image, which contains only the built static files, and the nginx service. It might be a bit old-school, but it has worked so far :) As for the PR #62 you’re right, the GitHub Action builds images under the Thanks again for your time! |
[docker] adding docker for c2dh
Added docker/c2dhunilu/.env to .gitignore and updated docker-compose.yml to use environment variables for sensitive and configurable values. Expanded README with detailed Docker usage instructions, including environment setup and data import steps.
This PR implements Docker build and publish workflow for both the client and server applications. It adds new Dockerfiles for the client and server, a Makefile and a GitHub Actions workflow.
Dockerization and Build Automation
Added
code/Dockerfile.clientandcode/Dockerfile.serverIntroduced
code/Makefilewith targets to build both client and server images locally, passing in Git and build metadata as arguments for reproducible builds.Continuous Integration and Publishing
Created
.github/workflows/docker-build-publish-client.ymlto automate building and publishing the client Docker image to Docker Hub on pushes to the main branch, ensuring up-to-date images are available.Created
.github/workflows/docker-build-publish-server.ymlto automate building and publishing the server Docker image to Docker Hub on pushes to the main branch, ensuring up-to-date images are available.