-
Notifications
You must be signed in to change notification settings - Fork 26
/
DockerfileServer
72 lines (52 loc) · 2.04 KB
/
DockerfileServer
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# conductor:server - Combined Netflix conductor server & UI
#
# ===========================================================================================================
# 0. Builder stage
# ===========================================================================================================
FROM alpine:3.18 AS builder
MAINTAINER Orkes Inc <builds@orkes.io>
# ===========================================================================================================
# 0. Build Conductor Server UI
# ===========================================================================================================
# Install dependencies
RUN apk add openjdk17
RUN apk add git
RUN apk add --update nodejs npm yarn
COPY . /conductor-community
WORKDIR conductor-community
RUN ./gradlew clean build -x test
WORKDIR /
RUN git clone https://github.com/Netflix/conductor
WORKDIR conductor/ui
RUN yarn config set network-timeout 600000 -g
RUN yarn install && yarn build
RUN ls -ltr
RUN echo "Done building UI"
FROM alpine:3.18.3
MAINTAINER Orkes Inc <builds@orkes.io>
RUN apk add nginx
RUN apk add openjdk17
RUN apk add coreutils
RUN apk add curl
# Make app folders
RUN mkdir -p /app/config /app/logs /app/libs /app/info
# Add UI
# Make sure to run build-ui.sh script before running the docker build to pull and build the UI
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=builder /conductor/ui/build .
COPY docker/config/nginx.conf /etc/nginx/http.d/default.conf
# Startup script(s)
COPY docker/config/startup.sh /app/startup.sh
COPY docker/config/config.properties /app/config/config.properties
COPY server/src/main/resources/banner.txt /app/config/banner.txt
# JAR files
COPY --from=builder conductor-community/server/build/libs/orkes-conductor-server-boot.jar /app/libs/server.jar
# Server version
#COPY assembled/libs/server-version.txt* /app/info
RUN chmod +x /app/startup.sh
HEALTHCHECK --interval=60s --timeout=30s --retries=10 CMD curl -I -XGET http://localhost:8080/health || exit 1
EXPOSE 5000 8080
CMD ["/app/startup.sh"]
ENTRYPOINT ["/bin/sh"]