mirror of
https://github.com/PlayEdu/docker-playedu-light
synced 2025-11-18 19:07:44 +08:00
rebuild
This commit is contained in:
12
.gitmodules
vendored
12
.gitmodules
vendored
@@ -1,12 +0,0 @@
|
||||
[submodule "playedu-api"]
|
||||
path = playedu-api
|
||||
url = https://github.com/PlayEdu/PlayEdu
|
||||
[submodule "playedu-backend"]
|
||||
path = playedu-backend
|
||||
url = https://github.com/PlayEdu/backend
|
||||
[submodule "playedu-h5"]
|
||||
path = playedu-h5
|
||||
url = https://github.com/PlayEdu/h5
|
||||
[submodule "playedu-pc"]
|
||||
path = playedu-pc
|
||||
url = https://github.com/PlayEdu/frontend
|
||||
28
Dockerfile
28
Dockerfile
@@ -1,19 +1,33 @@
|
||||
FROM eclipse-temurin:17 as ApiBuilder
|
||||
|
||||
COPY playedu-api /app
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y git
|
||||
|
||||
RUN mkdir /app
|
||||
|
||||
WORKDIR /app
|
||||
RUN git clone -b dev https://github.com/PlayEdu/PlayEdu.git playedu
|
||||
|
||||
# 编译jar包
|
||||
WORKDIR /app/playedu
|
||||
|
||||
RUN /app/mvnw -Dmaven.test.skip=true clean package
|
||||
|
||||
FROM node:20-alpine as NodeBuilder
|
||||
|
||||
COPY playedu-backend /app/backend
|
||||
COPY playedu-pc /app/pc
|
||||
COPY playedu-h5 /app/h5
|
||||
# install git - apt-get replace with apk
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
apk add --no-cache bash git openssh
|
||||
|
||||
# 编译后端
|
||||
WORKDIR /app
|
||||
RUN git clone -b dev https://github.com/PlayEdu/backend.git backend
|
||||
RUN git clone -b dev https://github.com/PlayEdu/frontend.git pc
|
||||
RUN git clone -b dev https://github.com/PlayEdu/h5.git h5
|
||||
|
||||
# 编译后台
|
||||
WORKDIR /app/backend
|
||||
RUN npm i && VITE_APP_URL=/api/ npm run build
|
||||
|
||||
@@ -37,7 +51,9 @@ RUN apt update && apt install -y nginx
|
||||
|
||||
RUN mkdir /app
|
||||
|
||||
COPY --from=ApiBuilder /app/playedu-api/target/playedu-api.jar /app/app.jar
|
||||
COPY docker/start.sh /app/api/start.sh
|
||||
|
||||
COPY --from=ApiBuilder /app/playedu/playedu-api/target/playedu-api.jar /app/api/app.jar
|
||||
|
||||
COPY --from=NodeBuilder /app/backend/dist /app/backend
|
||||
COPY --from=NodeBuilder /app/pc/dist /app/frontend
|
||||
@@ -48,4 +64,6 @@ COPY docker/nginx/conf/nginx.conf /etc/nginx/sites-enabled/default
|
||||
|
||||
RUN chmod +x /app/api/start.sh
|
||||
|
||||
WORKDIR /app/api
|
||||
|
||||
ENTRYPOINT ["/app/api/start.sh"]
|
||||
5
docker/start.sh
Normal file
5
docker/start.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
nginx
|
||||
|
||||
java -jar /app/api/app.jar
|
||||
Submodule playedu-api deleted from 26074efea4
Submodule playedu-backend deleted from f897a029f5
Submodule playedu-h5 deleted from e8e047da37
Submodule playedu-pc deleted from c00a7236a7
Reference in New Issue
Block a user