From 7319bb7523403df301b27fb1f1b087e7dbb71c8a Mon Sep 17 00:00:00 2001 From: Puechberty Arthur Date: Thu, 23 Apr 2026 00:16:31 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20ajout=20d'un=20workflow=20de=20d=C3=A9p?= =?UTF-8?q?loiement=20pour=20la=20production?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 1 + .github/workflows/deploy.yml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.env.example b/.env.example index 5b65a70..89d630e 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,7 @@ NODE_ENV=production # PORT PUBLIC WEB_PORT=3000 +API_PORT=4000 # DB POSTGRES_DB= diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..9f30f47 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,23 @@ +name: Deploy Production + +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: [self-hosted, linux, docker] + + steps: + - name: Deploy on server + run: | + cd /srv/apps/flint + + echo "Pull latest code" + git pull origin main + + echo "Build & restart containers" + docker compose up -d --build --remove-orphans + + echo "Cleanup old images" + docker image prune -f \ No newline at end of file