Prune by default after deploy
This commit is contained in:
@@ -45,6 +45,7 @@ This will:
|
|||||||
5. Ensure Traefik is running and accepting traffic on port 80.
|
5. Ensure Traefik is running and accepting traffic on port 80.
|
||||||
6. Stop any containers running a previous versions of the app.
|
6. Stop any containers running a previous versions of the app.
|
||||||
7. Start a new container with the version of the app that matches the current git version hash.
|
7. Start a new container with the version of the app that matches the current git version hash.
|
||||||
|
8. Prune unused images and stopped containers to ensure servers don't fill up.
|
||||||
|
|
||||||
Voila! All the servers are now serving the app on port 80, and you're ready to put them behind a load balancer to serve live traffic.
|
Voila! All the servers are now serving the app on port 80, and you're ready to put them behind a load balancer to serve live traffic.
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace :mrsk do
|
|||||||
task fresh: [ "server:bootstrap", "registry:login", "app:deliver", "traefik:start", "app:stop", "app:run" ]
|
task fresh: [ "server:bootstrap", "registry:login", "app:deliver", "traefik:start", "app:stop", "app:run" ]
|
||||||
|
|
||||||
desc "Push the latest version of the app, ensure Traefik is running, then restart app"
|
desc "Push the latest version of the app, ensure Traefik is running, then restart app"
|
||||||
task deploy: [ "registry:login", "app:deliver", "traefik:start", "app:stop", "app:run" ]
|
task deploy: [ "registry:login", "app:deliver", "traefik:start", "app:stop", "app:run", "prune" ]
|
||||||
|
|
||||||
desc "Rollback to VERSION=x that was already run as a container on servers"
|
desc "Rollback to VERSION=x that was already run as a container on servers"
|
||||||
task rollback: [ "app:restart" ]
|
task rollback: [ "app:restart" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user