aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/Dockerfile
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-27 19:02:32 +0900
committernsfisis <nsfisis@gmail.com>2024-07-27 19:02:32 +0900
commit7cbf34204233df7c7e9e4b24998e25dbd8d2a423 (patch)
tree848da44374c48edec603fb014c59ad0fbb9307e6 /frontend/Dockerfile
parent18308a22879dc9143a03bcbe53cf0c5e8e49ee1f (diff)
downloadiosdc-japan-2025-albatross-7cbf34204233df7c7e9e4b24998e25dbd8d2a423.tar.gz
iosdc-japan-2025-albatross-7cbf34204233df7c7e9e4b24998e25dbd8d2a423.tar.zst
iosdc-japan-2025-albatross-7cbf34204233df7c7e9e4b24998e25dbd8d2a423.zip
organize dockerfiles and compose.yaml
Diffstat (limited to 'frontend/Dockerfile')
-rw-r--r--frontend/Dockerfile28
1 files changed, 28 insertions, 0 deletions
diff --git a/frontend/Dockerfile b/frontend/Dockerfile
new file mode 100644
index 0000000..974725e
--- /dev/null
+++ b/frontend/Dockerfile
@@ -0,0 +1,28 @@
+ARG ALBATROSS_HOST
+
+FROM node:20.14.0 AS builder
+
+WORKDIR /app
+ENV NODE_ENV=production
+
+COPY package.json package-lock.json .
+RUN npm install --include=dev
+
+COPY . .
+RUN npm run build
+
+################################################################################
+FROM node:20.14.0
+
+WORKDIR /app
+ENV NODE_ENV=production
+
+COPY package.json package-lock.json .
+RUN npm install --omit=dev
+
+COPY --from=builder /app/build ./build
+
+ENV HOST="$ALBATROSS_HOST"
+ENV PORT=80
+EXPOSE 80
+CMD ["npm", "run", "start"]