brainvisa / brainvisa.github.io

Source of BrainVISA developers site
2 stars 2 forks source link

Jenkins servers are not started automatically #28

Open sapetnioc opened 3 years ago

sapetnioc commented 3 years ago

On new.brainvisa.info server it is necessary to launch the following commands to start Jenkins :

docker container run --name jenkins-docker --rm --detach   --privileged --network jenkins --network-alias docker   --env DOCKER_TLS_CERTDIR=/certs   --volume jenkins-docker-certs:/certs/client   --volume jenkins-data:/var/jenkins_home   --publish 2376:2376 docker:dind

docker container run --name jenkins --rm --detach   --network jenkins --env DOCKER_HOST=tcp://docker:2376   --env DOCKER_CERT_PATH=/certs/client --env DOCKER_TLS_VERIFY=1   --env JENKINS_OPTS="--prefix=/builds"   --volume jenkins-data:/var/jenkins_home   --volume jenkins-docker-certs:/certs/client:ro   --publish 8080:8080 --publish 50000:50000 jenkins/jenkins

This does not resist to a process crash or a system reboot.

sapetnioc commented 1 year ago

Would it be enough to use --restart unless-stopped option ? I am not sure it would resist to server reboot but it may since restart policies are also applied at docker start. https://docs.docker.com/config/containers/start-containers-automatically/

ylep commented 1 year ago

Actually, this (--restart always) was the way that I had set up Jenkins back in 2021. This is documented in a script called setup_jenkins.sh in the homedir of the brainvisa user on the server. Probably not the best place to store that bit of information... @sapetnioc did you find where the documentation for the web server setup is stored?