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 .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Git specific
.git
.gitignore

# Node specific
node_modules
npm-debug.log

# Build artifacts (will be generated inside the container)
dest/
build/

# OS specific
.DS_Store
*.stackdump

# Editor specific
.vscode
*.sublime-project
*.sublime-workspace
nbproject

# Other
diff.txt
report/
*.private.*
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Build stage
FROM node:20 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install --legacy-peer-deps
RUN npm install -g grunt-cli
COPY . .
RUN grunt build

# Production stage
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dest/prod ./dest/prod
COPY package*.json ./
RUN npm install --production --legacy-peer-deps
EXPOSE 9001
CMD ["npx", "http-server", "dest/prod", "-p", "9001"]
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3.8'

services:
piskel:
build: .
ports:
- "9001:9001"
environment:
- NODE_ENV=production
restart: unless-stopped