aboutsummaryrefslogtreecommitdiff
path: root/cmd/hdrwtch/Dockerfile
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-08-21 19:59:59 -0400
committerXe Iaso <me@xeiaso.net>2024-08-21 19:59:59 -0400
commit2a8393020e0c1cc302c87fcdf0601b15aaa10f1b (patch)
treed56a43a2aa4e0c88c10e651f69e8d7d18b1946b9 /cmd/hdrwtch/Dockerfile
parentd9a0fb6435165fd3c6044de9ce8cbb0662fb6628 (diff)
downloadx-2a8393020e0c1cc302c87fcdf0601b15aaa10f1b.tar.xz
x-2a8393020e0c1cc302c87fcdf0601b15aaa10f1b.zip
cmd/hdrwtch: yolo
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/hdrwtch/Dockerfile')
-rw-r--r--cmd/hdrwtch/Dockerfile39
1 files changed, 39 insertions, 0 deletions
diff --git a/cmd/hdrwtch/Dockerfile b/cmd/hdrwtch/Dockerfile
new file mode 100644
index 0000000..a773761
--- /dev/null
+++ b/cmd/hdrwtch/Dockerfile
@@ -0,0 +1,39 @@
+# syntax = docker/dockerfile:1
+
+# Adjust NODE_VERSION as desired
+ARG NODE_VERSION=20.16.0
+FROM node:${NODE_VERSION}-slim as base
+
+LABEL fly_launch_runtime="Node.js"
+
+# Node.js app lives here
+WORKDIR /app
+
+# Set production environment
+ENV NODE_ENV="production"
+
+
+# Throw-away build stage to reduce size of final image
+FROM base as build
+
+# Install packages needed to build node modules
+RUN apt-get update -qq && \
+ apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3
+
+# Install node modules
+COPY --link package-lock.json package.json ./
+RUN npm ci
+
+# Copy application code
+COPY --link . .
+
+
+# Final stage for app image
+FROM base
+
+# Copy built application
+COPY --from=build /app /app
+
+# Start the server by default, this can be overwritten at runtime
+EXPOSE 3000
+CMD [ "node", "tailwind.config.js" ]