-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
upstream PROJECT_NAME { | ||
server PROJECT-NAME:5173; | ||
} | ||
|
||
server { | ||
server_name PROJECT-NAME.metakgp.org; | ||
|
||
location / { | ||
proxy_pass http://PROJECT_NAME; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Original-URI $request_uri; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
} |
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,14 @@ | ||
#!/bin/bash | ||
|
||
cleanup() { | ||
echo "Container stopped. Removing nginx configuration." | ||
rm /etc/nginx/sites-enabled/PROJECT_NAME.metaploy.conf | ||
} | ||
|
||
trap 'cleanup' SIGQUIT SIGTERM SIGHUP | ||
|
||
"${@}" & | ||
|
||
cp ./PROJECT_NAME.metaploy.conf /etc/nginx/sites-enabled | ||
|
||
wait $! |