Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use the official Node.js image
FROM node:lts-slim

# Set the working directory in the container
WORKDIR /app

# Copy package.json and pnpm-lock.yaml for installing dependencies
COPY package.json pnpm-lock.yaml ./

# Install pnpm
RUN npm install -g pnpm

# Install project dependencies
RUN pnpm install --frozen-lockfile

# Copy the rest of the application code
COPY . .

# Build the application for production
RUN pnpm run build

# Expose the port
EXPOSE 3000

# Command to run the application in production
CMD ["pnpm", "run", "start"]
12 changes: 12 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
hckrnws:
container_name: hckrnws
build:
context: .
dockerfile: Dockerfile
image: hckrnws:latest
restart: unless-stopped
security_opt:
- no-new-privileges
ports:
- 3000:3000