mirror of
https://github.com/arthur-pbty/flint.git
synced 2026-08-01 20:29:03 +02:00
feat: ajout d'un workflow de déploiement pour la production
This commit is contained in:
@@ -2,6 +2,7 @@ NODE_ENV=production
|
|||||||
|
|
||||||
# PORT PUBLIC
|
# PORT PUBLIC
|
||||||
WEB_PORT=3000
|
WEB_PORT=3000
|
||||||
|
API_PORT=4000
|
||||||
|
|
||||||
# DB
|
# DB
|
||||||
POSTGRES_DB=
|
POSTGRES_DB=
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user