Skip to content

Commit

Permalink
Merge pull request #3 from shahzaib-m/merge-webapp-client-project
Browse files Browse the repository at this point in the history
Merge webapp project into this repo under webapp-client
  • Loading branch information
shahzaib-m authored Jul 11, 2024
2 parents 5618ded + 628b26e commit a5c0890
Show file tree
Hide file tree
Showing 33 changed files with 14,598 additions and 0 deletions.
5 changes: 5 additions & 0 deletions webapp-client/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VUE_APP_SYLVRE_API_URL=https://sylvre.shahzaibm.com/api
VUE_APP_SYLVRE_DOCS_URL=https://sylvre.shahzaibm.com/docs
VUE_APP_SYLVRE_MAIN_PROJECT_GITHUB=https://github.com/shahzaib-m/Sylvre
VUE_APP_SYLVRE_WEBAPP_PROJECT_GITHUB=https://github.com/shahzaib-m/Sylvre-WebApp
VUE_APP_AUTHOR_URL=https://shahzaibm.com
37 changes: 37 additions & 0 deletions webapp-client/.github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Docker Image CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Install jq
run: sudo apt-get install -y jq

- name: Extract version
id: get_version
run: echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Log in to GHCR
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Build and push
run: |
IMAGE_NAME=ghcr.io/shahzaib-m/sylvre-webapp
VERSION=${{ env.VERSION }}
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest .
docker push $IMAGE_NAME:$VERSION
docker push $IMAGE_NAME:latest
21 changes: 21 additions & 0 deletions webapp-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
16 changes: 16 additions & 0 deletions webapp-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# build stage
FROM node:lts-alpine as build-stage

WORKDIR /app
COPY package*.json ./

RUN npm ci
COPY . .
RUN npm run build

# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
2 changes: 2 additions & 0 deletions webapp-client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Sylvre-WebApp
A Vue.js web application for Sylvre.
5 changes: 5 additions & 0 deletions webapp-client/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
Loading

0 comments on commit a5c0890

Please sign in to comment.