-
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.
Create an ngnix container to serve the content
- Loading branch information
Showing
7 changed files
with
84 additions
and
9 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 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,6 @@ | ||
# cd ngnix | ||
# docker build -t nck974/flight-combination-finder-ngnix:1.0.1 . | ||
# docker push nck974/flight-combination-finder-ngnix:1.0.1 | ||
FROM nginx:1.25.2 | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
COPY ssl.conf /etc/nginx/conf.d/ssl.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
events { | ||
|
||
} | ||
|
||
http { | ||
server { | ||
listen 80; | ||
|
||
http2 on; | ||
|
||
server_name $hostname; | ||
|
||
return 301 https://$host$request_uri; | ||
} | ||
|
||
server { | ||
listen 443 default_server ssl; | ||
listen [::]:443 ssl; # ipv6 | ||
|
||
http2 on; | ||
|
||
server_name $hostname; | ||
|
||
# Configure ssl | ||
include /etc/nginx/conf.d/ssl.conf; | ||
|
||
# Hide server versions | ||
server_tokens off; | ||
|
||
# Allow uploads of larger files | ||
client_max_body_size 20M; | ||
|
||
# Configure paths | ||
location /backend { | ||
proxy_pass http://flightcombinationfinder:8080/backend; | ||
} | ||
|
||
location / { | ||
proxy_pass http://flightcombinationfinderng:80; | ||
} | ||
|
||
} | ||
|
||
} |
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,8 @@ | ||
# Enable SSL | ||
ssl_certificate /etc/nginx/ssl/cert.pem; | ||
ssl_certificate_key /etc/nginx/ssl/cert.key; | ||
ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH; | ||
ssl_prefer_server_ciphers on; | ||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | ||
ssl_session_cache shared:SSL:10m; | ||
ssl_session_timeout 10m; |