From 012d0fe8234db5f2f5a7e91dac013822320264d9 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Thu, 8 Jun 2023 16:33:34 +0200 Subject: [PATCH] Fixing earthfile --- Dockerfile | 17 ----------------- Earthfile | 18 ++++++++++++++++++ package.json | 2 ++ public/design.html | 19 +++++++++++++++++++ public/styles.css | 21 +++++++++++++++++++++ tsconfig.json | 1 + 6 files changed, 61 insertions(+), 17 deletions(-) delete mode 100644 Dockerfile create mode 100644 Earthfile create mode 100644 public/design.html create mode 100644 public/styles.css diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index cbb87ea..0000000 --- a/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM node:12 - -LABEL maintainer="Fabian Stamm " - -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app - -RUN npm config set registry https://npm.hibas123.de - -COPY ["package.json", "tsconfig.json", "/usr/src/app/"] - -RUN npm install -COPY src/ /usr/src/app/src -COPY public/ /usr/src/app/public - -EXPOSE 3000/tcp -CMD ["npm", "run", "start"] diff --git a/Earthfile b/Earthfile new file mode 100644 index 0000000..1013c29 --- /dev/null +++ b/Earthfile @@ -0,0 +1,18 @@ +VERSION 0.7 +FROM node:lts-alpine3.18 +WORKDIR /build + +docker-multi: + BUILD --platform linux/amd64 --platform linux/arm64 +docker + +docker: + COPY package.json tsconfig.json . + COPY src ./src + COPY public ./public + RUN yarn install + RUN yarn build + WORKDIR /build + ENTRYPOINT ["node", "lib/index.js"] + ARG EARTHLY_TARGET_TAG + ARG TAG=$EARTHLY_TARGET_TAG + SAVE IMAGE --push docker.hibas123.de/screenshare:$TAG diff --git a/package.json b/package.json index 3049e71..4458b43 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,9 @@ { "name": "ScreenSharingThing", "packageManager": "yarn@3.1.1", + "version": "0.1.0", "scripts": { + "build": "tsc", "dev": "ts-node src/index.ts" }, "devDependencies": { diff --git a/public/design.html b/public/design.html new file mode 100644 index 0000000..0dc43e6 --- /dev/null +++ b/public/design.html @@ -0,0 +1,19 @@ + + + + + + Simple Screen Sharing + + + +
+
+ VIDEO +
+
+ CHAT +
+
+ + \ No newline at end of file diff --git a/public/styles.css b/public/styles.css new file mode 100644 index 0000000..98ba1df --- /dev/null +++ b/public/styles.css @@ -0,0 +1,21 @@ +.desktop .container { + display: grid; + grid-template-columns: 1fr auto; + grid-template-rows: 1fr; + grid-template-areas: "video chat"; +} + +.mobile .container { + display: grid; + grid-template-columns: 1fr; + grid-template-rows: auto 1fr; + grid-template-areas: "video" "chat"; +} + +.video { + grid-area: video; +} + +.chat { + grid-area: chat; +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 040ea56..65bec57 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "outDir": "lib", "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, "module": "commonjs" /* Specify what module code is generated. */, "moduleResolution": "node" /* Specify how the compiler resolves module names. */,