La cruza con traccar se hace en el backend #65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy main en Potus WS | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: potus | |
environment: staging | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build Docker image BACKEND | |
run: docker build -t ghcr.io/grupo-4-lcs-ungs/back/g4-api-server-dev:latest -f ./Dockerfile-staging . | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push Docker image to GCR BACKEND | |
run: docker push ghcr.io/grupo-4-lcs-ungs/back/g4-api-server-dev:latest | |
deploy: | |
runs-on: potus | |
environment: staging | |
needs: build | |
steps: | |
- name: Bajar servicio anterior Intento 1 | |
run: docker-compose -f docker-compose-stage.yml -p g4-api down | |
- name: Bajar servicio anterior Intento 2 | |
run: docker-compose -f docker-compose-stage.yml -p g4-api down | |
- name: Desplegar en PWS | |
env: | |
DB_HOST: ${{ secrets.DB_HOST }} | |
DB_PORT: ${{ secrets.DB_PORT }} | |
DB_USER: ${{ secrets.DB_USER }} | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
DB_NAME: ${{ secrets.DB_NAME }} | |
SECRET_KEY: ${{ secrets.APP_SECRET_KEY }} | |
APP_PORT: ${{ secrets.APP_PORT }} | |
APP_HOST: ${{ secrets.APP_HOST }} | |
ENV: staging | |
run: docker-compose -f docker-compose-stage.yml -p g4-api up -d |