Skip to content

Commit

Permalink
feat : 깃허브 액션에 email.yml 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Doncham committed Mar 15, 2024
1 parent 3c8e37f commit a35b911
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 47 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/githubAction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ jobs:
java-version: '17'
distribution: 'temurin'

- name: make application-email.yml
run: |
cd ./src/main/resources
# application-email.yml 파일을 생성합니다.
touch ./application-email.yml
# GitHub-Actions 에서 설정한 값을 application-email.yml 파일에 작성합니다.
echo "${{ secrets.APPLICATION_EMAIL }}" >> ./application-email.yml
shell: bash

# gradle을 통해 소스를 빌드
- name: Build with Gradle
run: |
Expand Down
96 changes: 49 additions & 47 deletions frontend/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
upstream api {
server backend:8080;
}

server {
listen 80;
server_name www.sharenote.shop;
#server_name localhost;
charset utf-8;

# SSL
# Allow only for register SSL (Certbot)
location /.well-known/acme-challenge/ {
allow all;
root /var/www/certbot;
http {
upstream api {
server backend:8080;
}

# Http로 들어온 요청을 Https로 리다이렉트
location / {
return 301 https://$host$request_uri;
}
}

server {
listen 443 ssl;
server_name www.sharenote.shop;

ssl_certificate /etc/letsencrypt/live/www.sharenote.shop/fullchain.pem; # ssl 인증서 사용
ssl_certificate_key /etc/letsencrypt/live/www.sharenote.shop/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

# 요청받은 uri로 연결 eg) http://127.0.0.1/login
location /api/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://api;
server {
listen 80;
server_name www.sharenote.shop;
#server_name localhost;
charset utf-8;

# SSL
# Allow only for register SSL (Certbot)
location /.well-known/acme-challenge/ {
allow all;
root /var/www/certbot;
}

# Http로 들어온 요청을 Https로 리다이렉트
location / {
return 301 https://$host$request_uri;
}
}

server {
listen 443 ssl;
server_name www.sharenote.shop;

# ignore cache frontend
location ~* (service-worker\.js)$ {
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
expires off;
proxy_no_cache 1;
}
# ssl_certificate /etc/letsencrypt/live/www.sharenote.shop/fullchain.pem; # ssl 인증서 사용
# ssl_certificate_key /etc/letsencrypt/live/www.sharenote.shop/privkey.pem;
# include /etc/letsencrypt/options-ssl-nginx.conf;
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

# 요청받은 uri로 연결 eg) http://127.0.0.1/login
location /api/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://api;
}

location / {
root /usr/share/nginx/html; #여기에 위치한 정적 파일을 제공
try_files $uri $uri/ /index.html?q=$uri&$args;
}

# ignore cache frontend
location ~* (service-worker\.js)$ {
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
expires off;
proxy_no_cache 1;
}

location / {
root /usr/share/nginx/html; #여기에 위치한 정적 파일을 제공
try_files $uri $uri/ /index.html?q=$uri&$args;
}


}
}

0 comments on commit a35b911

Please sign in to comment.