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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ IoTDB-Workbench是IoTDB的可视化管理工具,可对IoTDB的数据进行增

[前端服务运行说明](frontend/README.md)

## Docker

`docker-compose up -d`


16 changes: 13 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
FROM hub.segma.tech/library/java:8-jre-centos7-apollo
FROM maven:3.8.2-amazoncorretto-8 as builder

COPY target/service-1.0.0.jar /app/app.jar
WORKDIR /app

ENTRYPOINT ["java", "-jar", "/app/app.jar"]
COPY . .

RUN mvn package

FROM adoptopenjdk/openjdk8

COPY --from=builder /app/target/workbench-1.0.0.jar /app/workbench-1.0.0.jar

EXPOSE 8080

ENTRYPOINT ["java", "-jar", "/app/workbench-1.0.0.jar"]
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.8"

services:
backend:
build: ./backend
restart: always
ports:
- 8081:8080

frontend:
build: ./frontend
restart: always
ports:
- 8080:8080
depends_on:
- backend
24 changes: 24 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:lts-alpine

# From official Vue Documentation https://vuejs.org/v2/cookbook/dockerize-vuejs-app.html

# install simple http server for serving static content
RUN npm install -g http-server

# make the 'app' folder the current working directory
WORKDIR /app

# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./

# install project dependencies
RUN npm install

# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .

# build app for production with minification
RUN npm run build

EXPOSE 8080
CMD [ "http-server", "dist" ]