-
-
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.
- Loading branch information
Showing
6 changed files
with
83 additions
and
2 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 |
---|---|---|
@@ -1,11 +1,21 @@ | ||
FROM nginx:1.27.0-bookworm | ||
|
||
# ---------------------------------------------------------------------------- # | ||
# Metadata # | ||
# ---------------------------------------------------------------------------- # | ||
|
||
LABEL org.opencontainers.image.description="Gateway for the Lectorium project" | ||
LABEL org.opencontainers.image.source="https://github.com/akdasa-studios/lectorium" | ||
|
||
# ---------------------------------------------------------------------------- # | ||
# Build # | ||
# ---------------------------------------------------------------------------- # | ||
|
||
# Copy the nginx configuration files | ||
WORKDIR /akd-studios/lectorium/services/gateway | ||
COPY . . | ||
|
||
# Run nginx | ||
# ---------------------------------------------------------------------------- # | ||
# Run # | ||
# ---------------------------------------------------------------------------- # | ||
|
||
CMD ["nginx", "-c", "/akd-studios/lectorium/services/gateway/envs/dev/_root.conf", "-g", "daemon off;"] |
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,50 @@ | ||
worker_processes auto; | ||
error_log /var/log/nginx/error.log notice; | ||
pid /var/run/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
resolver 127.0.0.11 valid=30s; | ||
resolver_timeout 10s; | ||
|
||
root /akd-studios/lectorium/services/gateway/envs/dev/static; | ||
index index.html index.htm; | ||
|
||
server { | ||
listen 80; | ||
server_name lectorium; | ||
access_log off; | ||
error_log off; | ||
return 301 https://$host$request_uri; | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
ssl_certificate /akd-studios/lectorium/services/gateway/keys/cert.crt; | ||
ssl_certificate_key /akd-studios/lectorium/services/gateway/keys/cert.key; | ||
ssl_ciphers HIGH:!aNULL:!MD5; | ||
server_name lectorium; | ||
|
||
include _index.conf; | ||
include services-database.endpoint.conf; | ||
include services-signed-url-generator.endpoint.conf; | ||
include services-vayu.endpoint.conf; | ||
} | ||
} |
Empty file.
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,5 @@ | ||
location /database { | ||
set $upstream_host "http://database:5984"; | ||
proxy_pass $upstream_host; | ||
rewrite ^/database/(.*) /$1 break; | ||
} |
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,5 @@ | ||
location /signed-url-generator { | ||
set $upstream_host "http://signed-url-generator:8000"; | ||
proxy_pass $upstream_host; | ||
rewrite ^/signed-url-generator/(.*) /$1 break; | ||
} |
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,11 @@ | ||
location /vayu { | ||
set $upstream_host "http://vayu-webserver:8080"; | ||
proxy_pass $upstream_host; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
} |