Skip to content

Commit 5d21f83

Browse files
author
brkdglr
committedJun 3, 2023
Merge branch 'master' into resultModal-Update
2 parents 706aa09 + a520762 commit 5d21f83

11 files changed

+22350
-27687
lines changed
 

‎java/Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM maven:3.8-openjdk-18 AS build
2+
COPY src /usr/src/app/src
3+
COPY pom.xml /usr/src/app
4+
RUN mvn -f /usr/src/app/pom.xml clean package
5+
6+
FROM openjdk:18-alpine
7+
COPY --from=build /usr/src/app/target/java-0.0.1-SNAPSHOT.jar /usr/app/java-0.0.1-SNAPSHOT.jar
8+
EXPOSE 8080
9+
ENTRYPOINT ["java","-jar","/usr/app/java-0.0.1-SNAPSHOT.jar"]

‎nginx/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM nginx:alpine
2+
RUN rm /etc/nginx/conf.d/default.conf
3+
COPY ./nginx.conf /etc/nginx/conf.d

‎nginx/nginx.conf

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
upstream online-data-scientist-fe {
2+
server online-data-scientist-fe:3000;
3+
}
4+
5+
upstream online-data-scientist-be {
6+
server online-data-scientist-be:8080;
7+
}
8+
9+
upstream online-data-scientist-py {
10+
server online-data-scientist-py:8000;
11+
}
12+
13+
server {
14+
listen 80;
15+
16+
location / {
17+
proxy_pass http://online-data-scientist-fe;
18+
}
19+
20+
location /api/v1/ {
21+
proxy_pass http://online-data-scientist-be;
22+
proxy_http_version 1.1;
23+
proxy_set_header Upgrade $http_upgrade;
24+
proxy_set_header Connection 'upgrade';
25+
proxy_set_header Host $host;
26+
proxy_cache_bypass $http_upgrade;
27+
}
28+
29+
location /python/ {
30+
proxy_pass http://online-data-scientist-py;
31+
proxy_http_version 1.1;
32+
proxy_set_header Upgrade $http_upgrade;
33+
proxy_set_header Connection 'upgrade';
34+
proxy_set_header Host $host;
35+
proxy_cache_bypass $http_upgrade;
36+
}
37+
38+
error_page 500 502 503 504 /50x.html;
39+
40+
location = /50x.html {
41+
root /usr/share/nginx/html;
42+
}
43+
}

0 commit comments

Comments
 (0)
Please sign in to comment.