Skip to content

Commit

Permalink
Merge pull request #79 from Arquisoft/master
Browse files Browse the repository at this point in the history
Actualizar develop con lo de master
  • Loading branch information
Santiago21112001 authored Mar 12, 2024
2 parents 223039a + 0e6d1a2 commit eac9fc8
Show file tree
Hide file tree
Showing 24 changed files with 433 additions and 191 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ jobs:
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
env:
API_URI: http://${{ secrets.DEPLOY_HOST }}:8000
REACT_APP_API_URI: http://${{ secrets.DEPLOY_HOST }}:8000
with:
name: arquisoft/wiq_es04c/webapp
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: webapp
buildargs: API_URI
buildargs: REACT_APP_API_URI
docker-push-questionservice:
name: Push question service Docker Image to GitHub Packages
runs-on: ubuntu-latest
Expand All @@ -75,7 +75,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: ./questionservice
workdir: questionservice



Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
deploy:
name: Deploy over SSH
runs-on: ubuntu-latest
needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp]
needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp,docker-push-questionservice]
steps:
- name: Deploy over SSH
uses: fifsky/ssh-action@master
Expand All @@ -144,5 +144,6 @@ jobs:
command: |
wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/master/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/master/.env -O .env
wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/master/questionservice/database/schema.sql -O schema.sql
docker compose --profile prod down
docker compose --profile prod up -d
docker compose --profile prod up -d --pull always
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# wiq_es04c

No hacer secciones nivel 0 (con solo un '=') porque no compila.
Ejemplo: no poner '= Requisitos de Calidad', sino '== Requisitos de Calidad'
No quitar el [[section-x]] del principio de un .adoc, porque si no no sale numerado.
Ejemplo: 12_glossary.adoc -> no quitar [[section-glossary]]
Enlace: http://20.0.114.254:3000

## Participantes

El proyecto `wiq_es04c` es el resultado del trabajo en equipo de los siguientes participantes:

- **Zohaib Akhtar Kausar** ([@Verzidee](https://github.com/Verzidee))
- **Sara Lamuño Garcia** ([@Etihw32](https://github.com/Etihw32))
- **Yago Navajas González** ([@yagonavajas](https://github.com/yagonavajas))
- **Santiago López Laso** ([@Santiago21112001](https://github.com/Santiago21112001))
- **David Alvarez Diaz** ([@bidof](https://github.com/bidof))

[![Deploy on release](https://github.com/Arquisoft/wiq_es04c/actions/workflows/release.yml/badge.svg)](https://github.com/Arquisoft/wiq_es04c/actions/workflows/release.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_es04c&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_es04c)
Expand All @@ -17,6 +24,7 @@ This repo is a basic application composed of several components.
- **User service**. Express service that handles the insertion of new users in the system.
- **Auth service**. Express service that handles the authentication of users.
- **Webapp**. React web application that uses the gateway service to allow basic login and new user features.
- **Question service**

Both the user and auth service share a Mongo database that is accessed with mongoose.

Expand Down Expand Up @@ -60,15 +68,7 @@ Other options include using the container services that most cloud services prov

We are going to use the first approach, creating a virtual machine in a cloud service and after installing docker and docker-compose, deploy our containers there using GitHub Actions and SSH.

## Participantes

El proyecto `wiq_es04c` es el resultado del trabajo en equipo de los siguientes participantes:

- **Zohaib Akhtar Kausar** ([@Verzidee](https://github.com/Verzidee))
- **Sara Lamuño Garcia** ([@Etihw32](https://github.com/Etihw32))
- **Yago Navajas González** ([@yagonavajas](https://github.com/yagonavajas))
- **Santiago López Laso** ([@Santiago21112001](https://github.com/Santiago21112001))
- **David Alvarez Diaz** ([@bidof](https://github.com/bidof))



Expand Down
21 changes: 10 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ services:
MYSQL_DATABASE: questions_db
MYSQL_CHARSET: utf8mb4
MYSQL_COLLATION: utf8mb4_unicode_ci
DB_PORT: 3306

DB_PORT: 3306
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
#montar en el directorio de mysql el archivo schema que esta en questionservice/database para que lo tenga el contendor y lo pueda ejecutar
#create_db es true
- ./questionservice/database/:/docker-entrypoint-initdb.d
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql

networks:
- mynetwork
expose:
- "3306"

authservice:
container_name: authservice-${teamname:-wiq_es04c}
image: ghcr.io/arquisoft/${teamname:-wiq_es04c}/authservice:latest
image: ghcr.io/arquisoft/wiq_es04c/authservice:latest
profiles: ["dev", "prod"]
build: ./users/authservice
depends_on:
Expand All @@ -51,7 +51,7 @@ services:

userservice:
container_name: userservice-${teamname:-wiq_es04c}
image: ghcr.io/arquisoft/${teamname:-wiq_es04c}/userservice:latest
image: ghcr.io/arquisoft/wiq_es04c/userservice:latest
profiles: ["dev", "prod"]
build: ./users/userservice
depends_on:
Expand All @@ -65,7 +65,7 @@ services:

gatewayservice:
container_name: gatewayservice-${teamname:-wiq_es04c}
image: ghcr.io/arquisoft/${teamname:-wiq_es04c}/gatewayservice:latest
image: ghcr.io/arquisoft/wiq_es04c/gatewayservice:latest
profiles: ["dev", "prod"]
build: ./gatewayservice
depends_on:
Expand All @@ -81,10 +81,11 @@ services:
AUTH_SERVICE_URL: http://authservice:8002
USER_SERVICE_URL: http://userservice:8001


questionservice:
container_name: questionservice-${teamname:-wiq_es04c}
build: questionservice
image: ghcr.io/arquisoft/wiq_es04c/questionservice:latest
profiles: ["dev", "prod"]
build: ./questionservice
depends_on:
- questionservice-mysql
ports:
Expand All @@ -97,15 +98,13 @@ services:

webapp:
container_name: webapp-${teamname:-wiq_es04c}
image: ghcr.io/arquisoft/${teamname:-wiq_es04c}/webapp:latest
image: ghcr.io/arquisoft/wiq_es04c/webapp:latest
profiles: ["dev", "prod"]
build: ./webapp
depends_on:
- gatewayservice
ports:
- "3000:3000"
environment:
- API_URI=${API_URI}

prometheus:
image: prom/prometheus
Expand Down
Loading

0 comments on commit eac9fc8

Please sign in to comment.