Skip to content

Commit

Permalink
feat: add metaploy config
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Jul 2, 2024
1 parent 654fca4 commit 759dfed
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
16 changes: 16 additions & 0 deletions metaploy/PROJECT_NAME.metaploy.conf
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;
}
}
14 changes: 14 additions & 0 deletions metaploy/postinstall.sh
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 $!

0 comments on commit 759dfed

Please sign in to comment.