Skip to content
Merged
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
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: edpacca

services:
dev:
build:
context: .
dockerfile: ./docker/dockerfile
ports:
- "5000:5000"
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=production
- PORT=5000
35 changes: 35 additions & 0 deletions docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Ignore the Dockerfile itself
Dockerfile
Dockerfile.dev
Dockerfile.prod

# Ignore Docker configuration files
.dockerignore

# Ignore Git files
.git
.gitignore
.gitattributes

# Ignore Node modules
node_modules

# Ignore build artifacts
build

# Ignore environment files
**/.env

# Ignore editor configuration files
.editorconfig
.vscode

# Ignore SvelteKit specific files
.svelte-kit

# Ignore other configuration files
README.md
.npmrc
.prettierrc
.eslintrc.cjs
.graphqlrc
28 changes: 28 additions & 0 deletions docker/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM node:22-slim AS builder

WORKDIR /app

COPY package.json package-lock.json ./

COPY svelte.config.js ./

RUN npm ci

COPY . .
RUN npm run build

RUN npm prune --omit=dev

FROM node:22-slim AS runner

WORKDIR /app

COPY --from=builder /app/build build/
COPY --from=builder /app/node_modules node_modules/
COPY package.json .

EXPOSE 5000

ENV NODE_ENV=production

CMD ["node", "build"]