Skip to content

Commit de256e3

Browse files
Merge pull request #62 from docusign/containirizated
dockerization: Add local set-up
2 parents fb5ddf5 + 0ca1613 commit de256e3

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

docker-compose-local.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: '3'
2+
services:
3+
nginx:
4+
platform: linux/amd64
5+
image: nginx:1.23.2-alpine
6+
ports:
7+
- 80:80
8+
- 443:443
9+
volumes:
10+
- ./infra/nginx/local/conf/:/etc/nginx/conf.d/:ro
11+
12+
frontend:
13+
build:
14+
context: ./client/
15+
dockerfile: Dockerfile
16+
17+
backend:
18+
build:
19+
context: ./server/
20+
dockerfile: Dockerfile
21+
ports:
22+
- 8000:8000
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
upstream frontend {
2+
server frontend:80;
3+
}
4+
5+
upstream backend {
6+
server backend:8000;
7+
}
8+
9+
server {
10+
listen 80;
11+
server_name _;
12+
server_tokens off;
13+
14+
location / {
15+
proxy_set_header X-Real-IP $remote_addr;
16+
proxy_set_header X-Real-Port $remote_port;
17+
proxy_set_header Host $http_host;
18+
proxy_connect_timeout 3000;
19+
proxy_send_timeout 3000;
20+
proxy_read_timeout 3000;
21+
proxy_pass http://frontend;
22+
}
23+
24+
location /api {
25+
proxy_set_header X-Real-IP $remote_addr;
26+
proxy_set_header X-Real-Port $remote_port;
27+
proxy_set_header Host $http_host;
28+
proxy_connect_timeout 3000;
29+
proxy_send_timeout 3000;
30+
proxy_read_timeout 3000;
31+
proxy_pass http://backend;
32+
}
33+
}

0 commit comments

Comments
 (0)