fix: dockerfile build and use compose

This commit is contained in:
Balint Ujvari
2026-03-11 18:44:11 +01:00
committed by Bálint Ujvári
parent 220618f19b
commit 76bf2211ca
5 changed files with 76 additions and 13 deletions
+47
View File
@@ -0,0 +1,47 @@
# Dependencies and build outputs
node_modules
build
lib
# Git
.git
.gitignore
# CI/CD and tooling
.github
.husky
tests
# Documentation
docs
*.md
LICENSE
CODE_OF_CONDUCT.md
CODEOWNERS
# Logs
*.log
npm-debug.log*
pnpm-debug.log*
# Environment files
.env
.env.local
.env.development
# OS files
.DS_Store
# IDE
.vscode
.idea
*.swp
*.swo
*~
# Coverage
coverage
# Dev scripts
desktop.mjs
utils
+5 -5
View File
@@ -1,13 +1,13 @@
FROM node:20-alpine AS build
FROM node:24-alpine AS build
WORKDIR /src
RUN corepack enable && corepack prepare pnpm@10 --activate
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
COPY . .
RUN pnpm run build
RUN pnpm run prepare
FROM node:20-alpine AS final
RUN corepack enable && corepack prepare pnpm@10 --activate && pnpm add -g serve
FROM node:24-alpine AS final
RUN npm install -g serve
WORKDIR /app
COPY --from=build /src/build .
EXPOSE 8080
+6
View File
@@ -79,6 +79,12 @@ docker build . -t bee-dashboard
docker run --rm -p 127.0.0.1:8080:8080 bee-dashboard
```
Alternatively, use Docker Compose:
```sh
docker compose up
```
Bee dashboard is now available on [`http://localhost:8080`](http://localhost:8080)
### Development
+7
View File
@@ -0,0 +1,7 @@
services:
bee-dashboard:
build: .
image: ethersphere/bee-dashboard:latest
ports:
- '127.0.0.1:8080:8080'
restart: unless-stopped
+8 -5
View File
@@ -1,12 +1,15 @@
{
"rewrites": [{ "source": "**", "destination": "/index.html" }],
"trailingSlash": false,
"headers": [
{
"source" : "*",
"headers" : [{
"key" : "Cache-Control",
"value" : "max-age=3600"
}]
"source": "*",
"headers": [
{
"key": "Cache-Control",
"value": "max-age=3600"
}
]
}
]
}