Skip to content

Commit

Permalink
Merge pull request #161 from Z-100/hotfix/reponames
Browse files Browse the repository at this point in the history
Hotfix/reponames
  • Loading branch information
Z-100 authored Sep 27, 2024
2 parents 12b950c + 83b23d1 commit 09f6837
Show file tree
Hide file tree
Showing 7 changed files with 32,007 additions and 11,040 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
build
.dockerignore
Dockerfile
36 changes: 36 additions & 0 deletions .github/workflows/push-dev-version-to-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and push latest dev version to dockerhub

on:
push:
branches: [ "develop" ]
workflow_dispatch:

env:
DH_USER: ""
DH_PASS: ""

jobs:
build-images:

permissions:
contents: read
id-token: write

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build images
run: |
echo "Building images"
docker build -t z100/vayan:latest .
- name: Push images
run: |
echo "Login to dockerhub"
docker login -u ${{ secrets.DH_USER }} -p ${{ secrets.DH_PASS }}
echo "Pushing images"
docker push z100/vayan:latest
40 changes: 40 additions & 0 deletions .github/workflows/push-prod-version-to-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and push new version to dockerhub

on:
push:
branches: [ "main" ]
workflow_dispatch:

env:
DH_USER: ""
DH_PASS: ""

jobs:
build-images:

permissions:
contents: read
id-token: write

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Get commit SHA
run: |
echo "COMMIT_SHA_SHORT=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV
- name: Build images
run: |
echo "Building images"
docker build -t z100/vayan:${{ env.COMMIT_SHA_SHORT }} .
- name: Push images
run: |
echo "Login to dockerhub"
docker login -u ${{ secrets.DH_USER }} -p ${{ secrets.DH_PASS }}
echo "Pushing images"
docker push z100/vayan:${{ env.COMMIT_SHA_SHORT }}
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:20-alpine

WORKDIR /app

ENV PATH /app/node_modules/.bin:$PATH

COPY package.json package-lock.json ./

RUN npm ci --silent && npm i -g serve --silent

COPY . .

RUN npm run build

CMD ["serve", "-s", "build"]
Loading

0 comments on commit 09f6837

Please sign in to comment.