refactor: self hosting setup (#411)

* merge-commit: self hosted updates

* dev: updates in self hosting setup

* dev: update script to get the instance IP

* dev: update script to generate backend secret key
This commit is contained in:
pablohashescobar
2023-03-09 20:49:12 +05:30
committed by GitHub
parent e3e57df4a2
commit 0416e07f46
7 changed files with 57 additions and 43 deletions

View File

@@ -1,4 +1,4 @@
FROM nginx:1.21-alpine
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d
COPY nginx.conf /etc/nginx/nginx.conf

View File

@@ -1,25 +1,20 @@
upstream plane {
server localhost:80;
}
events { }
error_log /var/log/nginx/error.log;
http {
sendfile on;
server {
listen 80;
root /www/data/;
access_log /var/log/nginx/access.log;
location / {
proxy_pass http://planefrontend:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://planefrontend:3000/;
}
location /api/ {
proxy_pass http://planebackend:8000/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}