-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: 배포서버 HTTPS 적용 Co-Authored-By: 조영우 <[email protected]> * chore: 개발서버 HTTPS 적용 * chore: nginx conf를 개발서버와 배포서버로 분리 * chore: 개발서버 분리를 위한 nginx dockerFile 분리 * fix: Dockerfile COPY설정에 빠진 디렉토리 수정 * fix: Dockerfile 오타 수정 --------- Co-authored-by: 조영우 <[email protected]> Co-authored-by: 조영우 <[email protected]>
- Loading branch information
1 parent
2b48e6e
commit 6fdf027
Showing
7 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
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 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 conf/conf.d/dev.conf /etc/nginx/conf.d | ||
|
||
CMD ["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,5 @@ | ||
FROM nginx | ||
|
||
COPY conf/conf.d/prod.conf /etc/nginx/conf.d | ||
|
||
CMD ["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,43 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
server_name dev.lesser-project.site; | ||
server_tokens off; | ||
|
||
location /.well-known/acme-challenge/ { | ||
root /var/www/certbot; | ||
} | ||
|
||
location / { | ||
return 301 https://dev.lesser-project.site$request_uri; | ||
} | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
listen [::]:443 ssl; | ||
|
||
server_name dev.lesser-project.site; | ||
|
||
ssl_certificate /etc/nginx/ssl/live/dev.lesser-project.site/fullchain.pem; | ||
ssl_certificate_key /etc/nginx/ssl/live/dev.lesser-project.site/privkey.pem; | ||
|
||
location / { | ||
proxy_pass http://frontend:5000; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
} | ||
|
||
location /api { | ||
proxy_pass http://backend:3000; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
} | ||
} |
23 changes: 22 additions & 1 deletion
23
nginx/conf/conf.d/default.conf → nginx/conf/conf.d/prod.conf
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