From a6d96597db15fdba8bc631f378dd43e7d802fc39 Mon Sep 17 00:00:00 2001
From: eribe255 <eribe255@student.liu.se>
Date: Wed, 6 Dec 2023 14:22:33 +0100
Subject: [PATCH] build.sh

---
 build.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 build.sh

diff --git a/build.sh b/build.sh
new file mode 100644
index 0000000..80cfa85
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+
+# Compile TypeScript files
+tsc -p tsconfig.json
+
+# Build the project
+npm run build
+
+# Set Docker Hub credentials
+DOCKER_HUB_USERNAME="c3solutions"
+DOCKER_HUB_PASSWORD="TDDC88_C3"
+
+# Set Docker image name
+DOCKER_IMAGE_NAME="$DOCKER_HUB_USERNAME/tddc88-c3"
+
+# Login to Docker Hub
+echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
+
+# Build Docker image
+docker build -t $DOCKER_IMAGE_NAME .
+
+# Push Docker image to Docker Hub
+docker push $DOCKER_IMAGE_NAME
-- 
GitLab