From 43f2da9cad0d52268a65e3c8bba1e169d25edfce Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Sun, 15 Sep 2024 21:44:10 +0200 Subject: [PATCH] add docker command --- castor.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/castor.php b/castor.php index 25f1a9e..45bdfd2 100644 --- a/castor.php +++ b/castor.php @@ -25,4 +25,16 @@ function install(): void function doc_server_start(): void { run('source venv/bin/activate && mkdocs serve'); +} + +#[AsTask(name: 'docker:build', description: 'Démarrage du serveur de documentation')] +function docker_build(): void +{ + run('docker compose build --no-cache && docker tag mock-veliko-api-app bfoujols/mock-veliko-api:latest && docker run -p 9042:80 bfoujols/mock-veliko-api:latest'); +} + +#[AsTask(name: 'docker:push', description: 'Démarrage du serveur de documentation')] +function docker_push(): void +{ + run('docker tag mock-veliko-api-app bfoujols/mock-veliko-api:latest && docker push bfoujols/mock-veliko-api:latest'); } \ No newline at end of file