Live data from Hacker News

Using Docker to develop and deploy Django apps

stavros.io

1–10 of 30 posts

Re: Using Docker to develop and deploy Django apps

#2
Hi Stavros,

Could you please clarify how do you do the deployment of a new version?

Not every commit to master is necessarily a deployment, right? So how do you trigger it?

How did you configure Captain Webhook to get the new image and replace the current one that was running?

Re: Using Docker to develop and deploy Django apps

#3
post #2

Hi Stavros, Could you please clarify how do you do the deployment of a new version? Not every commit to master is necessarily a deployment, right? So how do you trigger it? How did you configure Captain Webhook to get the new image and replace the current one that was running?

Hey slig. I use Git (or Github) flow, so yes, every commit to master is necessarily a deployment (that's why I only have the build and deployment running on the master branch).

Captain Webhook just restarts the service. The systemd service file looks like this, and auto-pulls on every restart: https://www.pastery.net/xrutdm/

I will update the post with the above, thank you.

Re: Using Docker to develop and deploy Django apps

#6
post #3
post #2

Hi Stavros, Could you please clarify how do you do the deployment of a new version? Not every commit to master is necessarily a deployment, right? So how do you trigger it? How did you configure Captain Webhook to get the new image and replace the current one that was running?

Hey slig. I use Git (or Github) flow, so yes, every commit to master is necessarily a deployment (that's why I only have the build and deployment running on the master branch). Captain Webhook just restarts the service. The systemd service file looks like this, and auto-pulls on every restart: https://www.pastery.net/xrutdm/ I will update the post with the above, thank you.

How do you prevent downtime from Docker restarting?

Re: Using Docker to develop and deploy Django apps

#7
post #3
post #2

Hi Stavros, Could you please clarify how do you do the deployment of a new version? Not every commit to master is necessarily a deployment, right? So how do you trigger it? How did you configure Captain Webhook to get the new image and replace the current one that was running?

Hey slig. I use Git (or Github) flow, so yes, every commit to master is necessarily a deployment (that's why I only have the build and deployment running on the master branch). Captain Webhook just restarts the service. The systemd service file looks like this, and auto-pulls on every restart: https://www.pastery.net/xrutdm/ I will update the post with the above, thank you.

clone: https://www.pastery.net/yjqmbz/

Re: Using Docker to develop and deploy Django apps

#9

"# Docker hack to wait until Postgres is up, then run stuff." wat

FTA:

> We have to do some contortions with the Django devserver, because Docker doesn’t care if Postgres is ready before starting the server, so Django sees that it can’t contact the database and quits. So, we just wait until port 5432 is ready before starting the devserver.

Re: Using Docker to develop and deploy Django apps

#10
post #3

Earlier quoted context omitted.

Hey slig. I use Git (or Github) flow, so yes, every commit to master is necessarily a deployment (that's why I only have the build and deployment running on the master branch). Captain Webhook just restarts the service. The systemd service file looks like this, and auto-pulls on every restart: https://www.pastery.net/xrutdm/ I will update the post with the above, thank you.

How do you prevent downtime from Docker restarting?

That is an excellent question! I don't, right now, but I'll find a way!
Post reply on HN