-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (27 loc) · 802 Bytes
/
Copy pathDockerfile
File metadata and controls
39 lines (27 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM gradle:8.14.3-jdk21 AS backend-build
WORKDIR /backend
COPY backend /backend
RUN gradle shadowJar
FROM oven/bun:latest AS frontend-build
WORKDIR /frontend
COPY frontend/web /frontend
ENV VITE_BASE_URL="https://umn.app/api"
ENV VITE_CDN_URL="https://cdn.umn.app"
RUN bun install
RUN bun run build
FROM oven/bun:latest AS admin-build
WORKDIR /admin
COPY frontend/admin /admin
ENV VITE_BASE_URL="https://umn.app/api"
ENV CI="true"
RUN bun install
RUN bun run build
FROM ubuntu:latest
WORKDIR /app
RUN apt-get -y update
RUN apt-get -y install openjdk-21-jdk
RUN apt-get -y install curl
COPY --from=backend-build /backend/build/libs/*.jar /app/app.jar
COPY --from=frontend-build /frontend/dist /app/frontend
COPY --from=admin-build /admin/dist /app/admin
CMD ["java", "-jar", "/app/app.jar"]