Skip to content

Commit

Permalink
Devops (#20)
Browse files Browse the repository at this point in the history
* KAN-27 Feature: redef del paso 1 prod

* KAN-27 Fix Errores en Dockerfile y Feature segunda etapa despliegue

* KAN-27 Refactor: CD en un solo archivo

* KAN-27 Fix checkout on prod api server y nueva action de firebase deploy

* KAN-27 Detectar error de permiso docker y segundo intento de firebase deploy

* nuevos permisos

* Por qué lee el docker-compose de dev en vez de el generico?

* KAN-27 API de fotos cargado en Github Secrets
  • Loading branch information
logos914 authored Sep 11, 2024
1 parent a6321e7 commit 329c411
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dev-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,6 @@ jobs:
EMAIL_SMTP_USER: ${{ secrets.EMAIL_SMTP_USER }}
EMAIL_SMTP_PASSWORD: ${{ secrets.EMAIL_SMTP_PASSWORD }}
EMAIL_SMTP_SERVER: ${{ secrets.EMAIL_SMTP_SERVER }}
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }}
TEST: "true"
run: docker-compose -f docker-compose-dev.yml -p dm-nms up -d
24 changes: 9 additions & 15 deletions .github/workflows/prod-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
run: npm install
- name: Buildear client
working-directory: ./client
run: npm run build
run: npm run build
env:
VITE_API_KEY: ${{ secrets.VITE_API_KEY }}


build-admin:
Expand All @@ -45,23 +47,13 @@ jobs:
- name: Buildear admin
working-directory: ./admin
run: npm run build



deploy-client:
runs-on: potus
needs: build-client
steps:
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: nms-devmaster
channelId: live
target: web-client


deploy-admin:
deploy-front:
runs-on: potus
needs: build-admin
needs: [build-admin, build-client]
steps:
- uses: lowply/deploy-firebase@v0.0.5
env:
Expand Down Expand Up @@ -105,5 +97,7 @@ jobs:
EMAIL_SMTP_USER: ${{ secrets.EMAIL_SMTP_USER }}
EMAIL_SMTP_PASSWORD: ${{ secrets.EMAIL_SMTP_PASSWORD }}
EMAIL_SMTP_SERVER: ${{ secrets.EMAIL_SMTP_SERVER }}
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }}
TEST: "true"
run: docker-compose -f docker-compose-prod.yml -p dm-nms up -d
run: docker-compose -f docker-compose-prod.yml -p dm-nms up -d

2 changes: 2 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ services:
restart: unless-stopped
ports:
- "5173:5173"
environment:
- VITE_BASE_URL=${VITE_BASE_URL}

networks:
default:
Expand Down

0 comments on commit 329c411

Please sign in to comment.