-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up docker compose in production (#795)
resolves: #792 Signed-off-by: Lan Xia <[email protected]>
- Loading branch information
Showing
15 changed files
with
108 additions
and
98 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ __pycache__/ | |
GitHubData/ | ||
JenkinsData/ | ||
JenkinsDataWithFeedback/ | ||
mongo | ||
TempData/ | ||
deployenv/ | ||
*.joblib | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:16 | ||
FROM node:18 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM mongo:4.0.9 | ||
FROM mongo:6.0.1 | ||
|
||
COPY sampleData.gz /sampleData.gz | ||
CMD mongorestore --host=mongo --archive=/sampleData.gz --db exampleDb --gzip --stopOnError |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM nginx | ||
|
||
COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
ENTRYPOINT nginx -g 'daemon off;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
events {} | ||
http { | ||
# Silence the nginx logs | ||
access_log off; | ||
|
||
server { | ||
listen 4000; | ||
|
||
#resolver 10.89.0.1; # for podman only | ||
resolver 127.0.0.11; # for docker only | ||
set $server "server"; | ||
set $client "client"; | ||
|
||
location /api/ { | ||
proxy_pass http://$server:3001; | ||
} | ||
location / { | ||
proxy_pass http://$client:3000; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
events {} | ||
http { | ||
# Silence the nginx logs | ||
access_log off; | ||
|
||
server { | ||
listen 80; | ||
|
||
location / { | ||
proxy_pass http://localhost:4000; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "TRSS", | ||
"version": "0.1.0", | ||
"description": "TestResultSummaryService", | ||
"main": "app.js", | ||
"scripts": { | ||
"docker": "docker compose --profile prod up --build", | ||
"docker-data": "docker compose --profile prod --profile data up --build", | ||
"docker-down": "docker compose down", | ||
"docker-ui": "REACT_APP_CONNECT_ADOPTIUM_API=enable docker compose up --build" | ||
}, | ||
"author": "", | ||
"license": "Apache License Version 2.0", | ||
"readmeFilename": "README.md" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
Dockerfile | ||
build | ||
node_modules | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
FROM node:16 | ||
FROM node:18 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY . . | ||
# Install serve first as it has no dependencies. | ||
RUN npm install -g serve | ||
|
||
# Only copy the npm related dependencies as they change rarely. | ||
COPY package.json package-lock.json . | ||
RUN sed -i 's/localhost/service/g' package.json | ||
RUN npm ci --legacy-peer-deps | ||
|
||
RUN npm ci | ||
# Copy the rest of the app and build it. | ||
COPY . . | ||
ARG REACT_APP_CONNECT_ADOPTIUM_API | ||
ENV REACT_APP_CONNECT_ADOPTIUM_API=$REACT_APP_CONNECT_ADOPTIUM_API | ||
RUN npm run build | ||
|
||
WORKDIR /usr/src/app/build | ||
EXPOSE 3000 | ||
CMD npm start | ||
ENTRYPOINT ["serve", "--single"] |