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