Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
antsuebae committed Oct 26, 2024
1 parent 6a28bbf commit 30503e8
Show file tree
Hide file tree
Showing 46 changed files with 18,416 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file specifies files that are *not* uploaded to Google Cloud
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore

# Node.js dependencies:
node_modules/
59 changes: 59 additions & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI / CD
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install echarts
- run: cd front; npm install; cd ..
- run: cd front; npm run build; cd ..
- run: npm install
- run: npx playwright install --with-deps
- run: npm run test-ASB
- run: npx playwright test


deploy:
needs: [test]
runs-on: ubuntu-latest
environment: production

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Authenticate to Google Cloud
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
run: |
echo '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}' > /tmp/credentials.json
gcloud auth activate-service-account --key-file=/tmp/credentials.json
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: 'sos2324-jul-asb'

- name: Use gcloud CLI
run: gcloud info

- name: Install npm dependencies
run: npm install echarts

- name: Install frontend dependencies
run: |
cd front
npm install
cd ..
- name: Build frontend
run: |
cd front
npm run build
cd ..
- name: Deploy to App Engine
run: gcloud app deploy --quiet


2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,5 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

gc-sa-key.json
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Base image
FROM node:latest


# Move to app folder
WORKDIR /usr/src/app


# Install app dependencies
COPY package*.json ./


# Install app dependencies
RUN npm install


# Copy the app code to the image
COPY . .
EXPOSE 8080
CMD [ "npm", "start" ]
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# sos2324-dic-sss
# SOS2324-DIC-ASB

- **Team**
- [Antonio Suero Baeza](https://github.com/antsuebae)
- **Project description**: Our project is based on analyzing the different types of vehicles motors in Europe.

- **Repository**: [gti-sos/SOS2324-DIC-ASB](https://github.com/gti-sos/sos2324-dic-sss.git)

- **URL**: [SOS2324-DIC-ASB](http://sos2324-dic-asb.appspot.com)

- **APIs**:
- ASB: [API-V1](http://sos2324-dic-asb.appspot.com/api/v1/cars-by-motor/docs) (developed by Antonio Suero Baeza)
- ASB: [API-V2](http://sos2324-dic-asb.appspot.com/api/v2/cars-by-motor/docs) (developed by Antonio Suero Baeza)
- **FRONT-END**:
- ASB: [FrontEnd-ASB](http://sos2324-dic-asb.appspot.com/cars-by-motor) (developed by Antonio Suero Baeza)
- **Docker**:
- docker run -p 12000:8080 -d "antsuebae03/sos2324-dic-asb:0.0.2"
1 change: 1 addition & 0 deletions app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime: nodejs20
Loading

0 comments on commit 30503e8

Please sign in to comment.