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
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM docker.io/node:lts-alpine3.15

RUN mkdir -p /opt/dber
COPY . /opt/dber
WORKDIR /opt/dber
RUN chmod +x start.sh
RUN npm install

ENTRYPOINT ["/bin/sh","/opt/dber/start.sh"]
CMD ["--dev"]

6 changes: 6 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ yarn dev

使用浏览器打开 [http://localhost:3000](http://localhost:3000) 查看结果.

## 使用docker构建
```bash
docker-compose up -d
```
使用浏览器打开 [http://localhost:3000](http://localhost:3000) 查看结果.

## 受到以下作品启发

[dbdiagram](https://dbdiagram.io/)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ yarn dev

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## Build & Startup with docker
```bash
docker-compose up -d
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## Inspired by

[dbdiagram](https://dbdiagram.io/)
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3'
services:
dber:
image: dber:latest
container_name: dber
build: .
ports:
- "3000:3000"
command: '--dev'
5 changes: 5 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if [[ $1 = "--dev" ]]; then
npm run dev
else
echo "Parameter error"
fi