Skip to content

Commit 230c472

Browse files
committed
dockerization backend and frontend
1 parent c4379c2 commit 230c472

File tree

126 files changed

+86
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+86
-3
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ DS_PRIVATE_KEY=./app/private.key
2323

2424
# React environment variables
2525
# UI and BE links
26-
REACT_APP_DS_RETURN_URL=http://localhost:3000
27-
REACT_APP_API_BASE_URL=http://localhost:5001/api
26+
REACT_APP_DS_RETURN_URL=http://localhost
27+
REACT_APP_API_BASE_URL=http://localhost/api
2828

2929
# The DS Authentication server
3030
DS_AUTH_SERVER=https://account-d.docusign.com

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*.pyc
22
.idea
3-
.env
3+
*.env*
44

55
__pycache__/
66

client/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM --platform=linux/amd64 node:20.14 AS base
2+
3+
ARG REACT_APP_API_BASE_URL
4+
ENV REACT_APP_API_BASE_URL=$REACT_APP_API_BASE_URL
5+
6+
WORKDIR /app
7+
COPY .env ./
8+
COPY ./package.json ./yarn.lock ./
9+
RUN npm install
10+
11+
COPY . .
12+
13+
RUN npm run build
14+
15+
# Run stage
16+
FROM --platform=linux/amd64 nginx:1.23-alpine
17+
COPY --from=base /app/build /var/www/app
18+
COPY ./nginx/conf/ /etc/nginx/conf.d
19+
EXPOSE 80 443

client/nginx/conf/default.conf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
server {
2+
listen 80;
3+
listen 443;
4+
5+
server_tokens off;
6+
7+
root /var/www/app;
8+
location / {
9+
autoindex on;
10+
autoindex_exact_size off;
11+
try_files $uri /index.html;
12+
}
13+
14+
location /api {
15+
# rewrite ^/api(/.+) /$1 break;
16+
# rewrite "^/api/(.*)$" /$1 break;
17+
18+
proxy_set_header X-Real-IP $remote_addr;
19+
proxy_set_header X-Real-Port $remote_port;
20+
proxy_set_header Host $http_host;
21+
proxy_connect_timeout 3000;
22+
proxy_send_timeout 3000;
23+
proxy_read_timeout 3000;
24+
proxy_pass http://backend:5001;
25+
}
26+
}
27+
File renamed without changes.

0 commit comments

Comments
 (0)