From bb3eb5c70901cc52702ffc62107c7b199e1875a6 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Sat, 10 Feb 2024 23:17:41 +0500 Subject: [PATCH] add docker build stuff --- .build/docker-compose.yml | 17 +++++++++++++++++ .build/node.Dockerfile | 9 +++++++++ compose.yml | 10 ++++++++++ 3 files changed, 36 insertions(+) create mode 100644 .build/docker-compose.yml create mode 100644 .build/node.Dockerfile create mode 100644 compose.yml diff --git a/.build/docker-compose.yml b/.build/docker-compose.yml new file mode 100644 index 0000000..748813a --- /dev/null +++ b/.build/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.5' +services: + + node: + build: + context: ../ + dockerfile: .build/node.Dockerfile + x-bake: + pull: true + platforms: +# - linux/amd64/v1 + - linux/amd64/v2 +# - linux/amd64/v3 +# - linux/arm/v7 + - linux/arm64 + hostname: node + image: registry.gitlab.com/sarlink/kyc diff --git a/.build/node.Dockerfile b/.build/node.Dockerfile new file mode 100644 index 0000000..2682222 --- /dev/null +++ b/.build/node.Dockerfile @@ -0,0 +1,9 @@ +FROM node:18.18-buster AS npminstall + +WORKDIR /var/www/html +COPY . /var/www/html + +RUN --mount=type=cache,target=/root/.npm \ + npm install + +CMD npm run start diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..e522f49 --- /dev/null +++ b/compose.yml @@ -0,0 +1,10 @@ +version: '3.5' +services: + + node: + hostname: node + image: registry.gitlab.com/sarlink/kyc + env_file: + - .env + ports: + - 4818:4818