-
Notifications
You must be signed in to change notification settings - Fork 302
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
Development
: Unify docker compose settings
#5809
Development
: Unify docker compose settings
#5809
Conversation
…ncement/docker-compose-unification
[develop-deployment-wg]
Development
: Unify docker compose settings
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.
Some comments
service: artemis-app | ||
ports: | ||
- 5005:5005 # Java Remote Debugging port declared in the java cmd options | ||
command: > |
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.
Instead of wait-for, you can use something like this:
gitlab:
build:
context: ./docker/gitlab
args:
GITLAB_VERSION: ${GITLAB_VERSION}
restart: unless-stopped
volumes:
- ./data/gitlab/config:/etc/gitlab
- ./data/gitlab/logs:/var/log/gitlab
- $BACKUP_DIR/gitlab:/var/opt/gitlab/backups
- ./data/gitlab/data:/var/opt/gitlab
ports:
- "22:22"
networks:
- artemis-net
healthcheck:
test: curl --fail -s -o /dev/null http://gitlab:80 || exit 1
interval: 60s
retries: 10
start_period: 120s
timeout: 10s
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.
I just remember these two stackoverflows threads [1] [2] when I looked into health checks for the Dockerfile.
Both say that the healthchecks of docker are not triggering anything unless you hack something together with killing certain things in your healthcheck CMD etc. ...
It seems like Kubernetes and Podman have better integrations for this feature.
They also sadly don't provide other probes like Kubernetes does. That's why I thought the mounting of the wait-for
script is the easiest way without a lot of own nc and curl scripting?! But I'm open for better solutions 😉
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.
mmh ok, the command is waiting until gitlab is ready ; I did't mentioned any problems on our systems 😂
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.
After writing you a PM on Slack about your prod setup I now have more of an idea of an alternative to the wait-for
script but just added it for now as a todo.
Co-authored-by: Dominik Fuchß <dominik.fuchss@kit.edu>
Co-authored-by: Dominik Fuchß <dominik.fuchss@kit.edu>
…b.com:ls1intum/Artemis into feature/deployment/docker-compose-unification
…ompose-unification
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.
Looks good for the initial iteration of the Docker cleanup. The remaining ToDos can be solved incrementally in the future.
Added just one more non-blocking question about the Artemis container build.
[develop-deployment-wg]
Development
: Unify docker compose settingsDevelopment
: Unify docker compose settings
develop-deployment-wg
branch which is WIP, there might be still open TODOs which will be fixed in different PRs, but reviews and feedbacks are welcome!Checklist
General
Motivation and Context
We would like to keep the Artemis container to a minimum and not integrate things needed in Docker, but maybe not in Kubernetes.
Also, the Docker Compose setup should be unified and easier to use.
Description
This PR unifies the Docker Compose settings and setups by doing the following:
extends
functionalityThis PR also improves the current Docker setup with these changes:
bootstrap.sh
for Artemis to make it rootless according to docker best practiceswait-for.sh
shell script for docker-compose setups to control service startup order(this is something docker compose doesn't support out of the box)TODOs
which are either still thoughts or real tasks for which I didn't have time yet (limited to/src/main/docker
and/docs/dev
)saml-test
service for basic SAML manual testing/debuggingmailhog
service for basic Mail testing/debuggingSteps for Testing
Play a bit with the different docker-compose setups:
Also, maybe test the following:
-f mailhog.yaml
Code Review
Manual Tests