diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..40afce8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.git/ +Dockerfile +.vscode/ \ No newline at end of file diff --git a/.github/workflows/build-deploy.yaml b/.github/workflows/build-deploy.yaml new file mode 100644 index 0000000..d43ff45 --- /dev/null +++ b/.github/workflows/build-deploy.yaml @@ -0,0 +1,68 @@ +name: cd +on: push + +env: + DEPLOYMENT: weatherstar + YAMLPATH: clusters/home-kluster/apps/weatherstar/weatherstar/app/deployment.yaml + +jobs: + build: + name: Build Image + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - id: short-sha + uses: benjlevesque/short-sha@v1.2 + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/rmitchellscott/ws4kp + tags: | + type=raw,priority=1000,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=ref,event=branch + ${{ steps.short-sha.outputs.sha }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and Push + id: docker_build + uses: docker/build-push-action@v3 + with: + context: . + pull: true + push: ${{ github.ref == 'refs/heads/main' }} + platforms: linux/amd64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + # deploy: + # runs-on: ubuntu-latest + # name: Deploy to flux + # needs: build + # steps: + # - name: Check out Kubernetes repo + # uses: actions/checkout@v3 + # with: + # repository: rmitchellscott/kubernetes-apps + # token: ${{ secrets.PAT }} + # - id: short-sha + # uses: benjlevesque/short-sha@v1.2 + # - name: Replace the image tag + # env: + # TAG: ${{ steps.short-sha.outputs.sha }} + # run: yq -i e '(select(.kind=="Deployment" and .metadata.name==env(DEPLOYMENT)) | .spec.template.spec.containers.[].image) |= split(":").0 + ":" + env(TAG)' $YAMLPATH + # - name: Commit and push + # uses: stefanzweifel/git-auto-commit-action@v4 + # with: + # commit_message: Update image tag for ${{env.DEPLOYMENT}} to ${{ steps.short-sha.outputs.sha }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cde0498 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM node:18-alpine +COPY . . +RUN npm install +CMD ["node", "index.js"] \ No newline at end of file diff --git a/server/images/Logo3-OG.png b/server/images/Logo3-OG.png new file mode 100644 index 0000000..cce7cd4 Binary files /dev/null and b/server/images/Logo3-OG.png differ diff --git a/server/images/Logo3.png b/server/images/Logo3.png index cce7cd4..dc4e2bc 100644 Binary files a/server/images/Logo3.png and b/server/images/Logo3.png differ