You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After these are fixed, what remains is to pull the built image into docker and run it on the production server instead of the old container (the old master), which can be done with two simple commands, e.g.:
docker kill OLD_CONTAINER_ID
docker run -d -e DEPLOY_TOKEN=XXX sympy/planet-sympy:v15
The OLD_CONTAINER_ID is the ID of the currently running container, XXX is specified on the server, and sympy/planet-sympy:v15 is the docker image tag, that changes with every deployment (typically the v15 increments to v16 for the next commit to master, but this can be changed). The first command kills the old container, and the second command will download the image from docker hub automatically, if it is not already cached locally, and run it.
So this is already extremely simple, compared to what maintenance nightmare the old planet sympy setup was. I am doing this manually for now. Until #23 is fixed, I am actually also doing this manually before the above two commands:
docker build -t sympy/planet-sympy:v15 .
Again, very simple, but it'd be nice not to have to do that either. For the docker build command, I actually have to have the latest planet-sympy repo checked out and be in the repository. For the docker kill and docker run commands, I don't even have to have the planet-sympy repository checked out, so things become even simpler.
So some tooling needs to be built around this to automate this last part (docker kill and docker run). I am sure we are not the only ones facing this issue, so let's see how other people are automating this.
The text was updated successfully, but these errors were encountered:
First some prerequisites must be fixed:
After these are fixed, what remains is to pull the built image into docker and run it on the production server instead of the old container (the old master), which can be done with two simple commands, e.g.:
The
OLD_CONTAINER_ID
is the ID of the currently running container,XXX
is specified on the server, andsympy/planet-sympy:v15
is the docker image tag, that changes with every deployment (typically thev15
increments tov16
for the next commit to master, but this can be changed). The first command kills the old container, and the second command will download the image from docker hub automatically, if it is not already cached locally, and run it.So this is already extremely simple, compared to what maintenance nightmare the old planet sympy setup was. I am doing this manually for now. Until #23 is fixed, I am actually also doing this manually before the above two commands:
Again, very simple, but it'd be nice not to have to do that either. For the
docker build
command, I actually have to have the latestplanet-sympy
repo checked out and be in the repository. For thedocker kill
anddocker run
commands, I don't even have to have theplanet-sympy
repository checked out, so things become even simpler.So some tooling needs to be built around this to automate this last part (
docker kill
anddocker run
). I am sure we are not the only ones facing this issue, so let's see how other people are automating this.The text was updated successfully, but these errors were encountered: