5 ms·
How is that painful? I run a service using docker and have your steps 4 through 7 as part of a systemd unit file. Updating the application requires a single s
by justinsaccount 10y ago
How is that painful?
I run a service using docker and have your steps 4 through 7 as part of a systemd unit file. Updating the application requires a single systemd restart command.
- sandGorgon 10y agocould you talk about your deployment scripts ? i am trying to deploy a single flask app which uses redis. I'm not sure how to set up logging, etc. and whether redis and flask will go in the same VM.
- justinsaccount 10y agoNot much in the way of scripts, but the systemd file I use is something like this: [Unit] Description=App After=docker.service Requires=docker.service [Service] TimeoutStartSec=0 ExecStartPre=/usr/bin/docker pull app ExecStartPre=-/usr/bin/docker kill app ExecStartPre=-/usr/bin/docker rm app ExecStart=/usr/bin/docker run --name app --rm=true -p 80:80 app [Install] WantedBy=multi-user.target With something like dokku I could just push the git repo containing the Dockerfile and it would accomplish the same thing
- detiber 10y agoYou probably also want to add: PartOf=Docker.service This will ensure that a restart of the docker service will trigger this service to be restarted.