Skip to content

Commit

Permalink
Merge pull request #188 from Arquisoft/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
baraganio authored Apr 28, 2024
2 parents b6b1bad + 42010a5 commit 6c8034f
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 62 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,40 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: gatewayservice
docker-push-prometheus:
name: Push Prometheus Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [e2e-tests]
steps:
- uses: actions/checkout@v4
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_es2c/gatewayservice/monitoring/prometheus
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: gatewayservice/monitoring/prometheus
docker-push-grafana:
name: Push Grafana Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [e2e-tests]
steps:
- uses: actions/checkout@v4
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_es2c/gatewayservice/monitoring/grafana
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: gatewayservice/monitoring/grafana
deploy:
name: Deploy over SSH
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ services:
prometheus:
image: prom/prometheus
container_name: prometheus-${teamname:-defaultASW}
profiles: ["dev"]
profiles: ["dev","prod"]
networks:
- mynetwork
volumes:
Expand All @@ -115,7 +115,7 @@ services:
grafana:
image: grafana/grafana
container_name: grafana-${teamname:-defaultASW}
profiles: ["dev"]
profiles: ["dev","prod"]
networks:
- mynetwork
volumes:
Expand Down
3 changes: 3 additions & 0 deletions gatewayservice/monitoring/grafana/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM grafana/grafana

COPY . .
3 changes: 3 additions & 0 deletions gatewayservice/monitoring/prometheus/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM prom/prometheus

COPY . .
133 changes: 73 additions & 60 deletions gatewayservice/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,68 +255,81 @@ paths:
description: Score achieved by the player.
example: 100

/createquestion:
get:
summary: Create a new question.
operationId: createQuestion
responses:
'200':
description: Question created successfully.
content:
application/json:
schema:
type: object
properties:
question:
type: string
description: The created question.
example: What is the capital of France?
answer:
type: string
description: The answer to the question.
example: Paris
/createquestion:
get:
summary: Get question from Wikidata
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
responseQuestionObject:
type: object
description: Question object
responseCorrectOption:
type: string
description: Correct option
responseAnswerOptions:
type: array
items:
type: string
description: Asnwer options
'500':
description: Error
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: |
Gets an random question from Wikidata and returns the question object, correct option and answer options.
/getquestionshistory:
get:
summary: Get the history of generated questions.
operationId: getQuestionsHistory
responses:
'200':
description: Questions history retrieved successfully.
content:
application/json:
schema:
type: array
items:
type: object
properties:
question:
type: string
description: The question.
example: What is 2 + 2?
answer:
type: integer
description: The correct answer to the question.
example: 4
/getquestionshistory:
get:
summary: Get the history of generated questions.
operationId: getQuestionsHistory
responses:
'200':
description: Questions history retrieved successfully.
content:
application/json:
schema:
type: array
items:
type: object
properties:
question:
type: string
description: The question.
example: What is 2 + 2?
answer:
type: integer
description: The correct answer to the question.
example: 4



/getregisteredusers:
get:
summary: Get the list of registered users.
operationId: getRegisteredUsers
responses:
'200':
description: List of registered users retrieved successfully.
content:
application/json:
schema:
type: array
items:
type: object
properties:
username:
type: string
description: Username of the registered user.
example: user1
/getregisteredusers:
get:
summary: Get the list of registered users.
operationId: getRegisteredUsers
responses:
'200':
description: List of registered users retrieved successfully.
content:
application/json:
schema:
type: array
items:
type: object
properties:
username:
type: string
description: Username of the registered user.
example: user1

0 comments on commit 6c8034f

Please sign in to comment.