mirror of
https://github.com/PlayEdu/docker-playedu-light
synced 2025-12-26 15:59:38 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
026d993b01 | ||
|
|
a8525a0634 | ||
|
|
3eb3273f09 | ||
|
|
adbf75bcd4 |
30
Dockerfile
30
Dockerfile
@@ -1,19 +1,3 @@
|
|||||||
FROM eclipse-temurin:17 as ApiBuilder
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get upgrade -y && \
|
|
||||||
apt-get install -y git
|
|
||||||
|
|
||||||
RUN mkdir /app
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
RUN git clone -b 1.5 https://github.com/PlayEdu/PlayEdu.git playedu
|
|
||||||
|
|
||||||
# 编译jar包
|
|
||||||
WORKDIR /app/playedu
|
|
||||||
|
|
||||||
RUN /app/playedu/mvnw -Dmaven.test.skip=true clean package
|
|
||||||
|
|
||||||
FROM node:20-alpine as NodeBuilder
|
FROM node:20-alpine as NodeBuilder
|
||||||
|
|
||||||
# install git - apt-get replace with apk
|
# install git - apt-get replace with apk
|
||||||
@@ -23,9 +7,9 @@ RUN apk update && \
|
|||||||
|
|
||||||
# 编译后端
|
# 编译后端
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN git clone -b 1.5 https://github.com/PlayEdu/backend.git backend
|
RUN git clone -b 1.6 https://github.com/PlayEdu/backend.git backend
|
||||||
RUN git clone -b 1.5 https://github.com/PlayEdu/frontend.git pc
|
RUN git clone -b 1.6 https://github.com/PlayEdu/frontend.git pc
|
||||||
RUN git clone -b 1.5 https://github.com/PlayEdu/h5.git h5
|
RUN git clone -b 1.6 https://github.com/PlayEdu/h5.git h5
|
||||||
|
|
||||||
# 编译后台
|
# 编译后台
|
||||||
WORKDIR /app/backend
|
WORKDIR /app/backend
|
||||||
@@ -39,9 +23,9 @@ RUN npm i && VITE_APP_URL=/api/ npm run build
|
|||||||
WORKDIR /app/h5
|
WORKDIR /app/h5
|
||||||
RUN npm i && VITE_APP_URL=/api/ npm run build
|
RUN npm i && VITE_APP_URL=/api/ npm run build
|
||||||
|
|
||||||
FROM eclipse-temurin:17
|
FROM registry.cn-hangzhou.aliyuncs.com/playedu/api:1.6
|
||||||
|
|
||||||
LABEL maintainer="0xtyz <tengyongzhi@meedu.vip>"
|
LABEL maintainer="滕勇志 <tengyongzhi@meedu.vip>"
|
||||||
|
|
||||||
# 使用东八区时间环境
|
# 使用东八区时间环境
|
||||||
RUN echo "Asia/Shanghai" > /etc/timezone
|
RUN echo "Asia/Shanghai" > /etc/timezone
|
||||||
@@ -49,11 +33,9 @@ RUN echo "Asia/Shanghai" > /etc/timezone
|
|||||||
#安装基本组件
|
#安装基本组件
|
||||||
RUN apt update && apt install -y nginx
|
RUN apt update && apt install -y nginx
|
||||||
|
|
||||||
RUN mkdir /app
|
|
||||||
|
|
||||||
COPY docker/start.sh /app/api/start.sh
|
COPY docker/start.sh /app/api/start.sh
|
||||||
|
|
||||||
COPY --from=ApiBuilder /app/playedu/playedu-api/target/playedu-api.jar /app/api/app.jar
|
RUN mv /app/app.jar /app/api/app.jar
|
||||||
|
|
||||||
COPY --from=NodeBuilder /app/backend/dist /app/backend
|
COPY --from=NodeBuilder /app/backend/dist /app/backend
|
||||||
COPY --from=NodeBuilder /app/pc/dist /app/frontend
|
COPY --from=NodeBuilder /app/pc/dist /app/frontend
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ docker run -d --restart=always \
|
|||||||
-e REDIS_DB=2 \
|
-e REDIS_DB=2 \
|
||||||
-e SA_TOKEN_IS_CONCURRENT=false \
|
-e SA_TOKEN_IS_CONCURRENT=false \
|
||||||
-e SA_TOKEN_JWT_SECRET_KEY=playeduxyz \
|
-e SA_TOKEN_JWT_SECRET_KEY=playeduxyz \
|
||||||
registry.cn-hangzhou.aliyuncs.com/playedu/light:1.5
|
registry.cn-hangzhou.aliyuncs.com/playedu/light:1.6
|
||||||
```
|
```
|
||||||
|
|
||||||
跑起来之后,可以通过下面的链接访问前后台:
|
跑起来之后,可以通过下面的链接访问前后台:
|
||||||
|
|||||||
Reference in New Issue
Block a user