Skip to content

Commit

Permalink
Devops (#17)
Browse files Browse the repository at this point in the history
* KAN-27 KAN-63 chore: Variables de entorno para envio de email

* KAN-27 refactor: Mejora en la organización de Jobs y Dockerfile para entorno dev, para permitir Dockerfile y despliegues en producción también

* KAN-27 chore: Agregadas las carpetas de build al gitignore

* KAN-27 feature: el build copia el archivo sql en la carpeta de build para despliegue, y crea la sqlite en el mismo lugar.
El backend ya no usa la sqlite desde src

* KAN-27 feature: Definiciones de CI/CD de producción

* KAN-27 chore: No agregar cache de firebase al repo

* KAN-27 no rastrear carpeta build

* KAN-27 fix: Faltó el paso de autenticar la githu action

* KAN-27 fix: Login y Docker en cada job de stagging

* KAN-27 Agregando env vars para email sobre stagging

* KAN-27 Agregando env vars para email sobre stagging
  • Loading branch information
logos914 authored Sep 10, 2024
1 parent d8a17e1 commit a3b8792
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/dev-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3


# Paso 3: Autenticar en GitHub Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}


build-backend:
runs-on: potus
needs: setup
Expand Down Expand Up @@ -112,4 +102,9 @@ jobs:
- name: Bajar servicio anterior Intento 2
run: docker-compose -f docker-compose-dev.yml -p dm-nms down
- name: Desplegar en PWS
env:
# Variables de entorno desde secrets
EMAIL_SMTP_USER: ${{ secrets.EMAIL_SMTP_USER }}
EMAIL_SMTP_PASSWORD: ${{ secrets.EMAIL_SMTP_HOST }}
EMAIL_SMTP_HOST: ${{ secrets.EMAIL_SMTP_SERVER }}
run: docker-compose -f docker-compose-dev.yml -p dm-nms up -d
6 changes: 4 additions & 2 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ services:
restart: unless-stopped
ports:
- "5175:3000"
volumes:
- ./backend/mydatabase.sqlite:/app/mydatabase.sqlite
environment:
- EMAIL_SMTP_USER=${EMAIL_SMTP_USER}
- EMAIL_SMTP_PASSWORD=${EMAIL_SMTP_HOST}
- EMAIL_SMTP_HOST=${secrets.EMAIL_SMTP_SERVER}

admin:
image: ghcr.io/devmasters2-0/tp-inicial-laboratorio/nms-admin-dev:latest
Expand Down

0 comments on commit a3b8792

Please sign in to comment.