-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1200 from NASA-AMMOS/feature/add-reverse-proxy
add HTTPS-enabled reverse proxy deployment example
- Loading branch information
Showing
5 changed files
with
127 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
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,7 @@ | ||
from docker.io/nginx:alpine3.18 | ||
|
||
# inject AERIE_HOST into nginx.conf | ||
copy ./nginx.conf.template /etc/nginx/templates/default.conf.template | ||
|
||
copy ./cert.pem /cert.pem | ||
copy ./key.pem /key.pem |
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 @@ | ||
services: | ||
aerie_proxy: | ||
container_name: aerie_proxy | ||
depends_on: | ||
- "aerie_ui" | ||
- "hasura" | ||
- "aerie_gateway" | ||
build: | ||
context: proxy | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
- "8080:8080" | ||
- "9000:9000" | ||
environment: | ||
NGINX_ENVSUBST_TEMPLATE_SUFFIX: ".template" | ||
AERIE_HOST: ${AERIE_HOST} | ||
networks: | ||
- aerie_net | ||
aerie_gateway: | ||
ports: !reset [] | ||
environment: | ||
GQL_API_URL: http://hasura:8080/v1/graphql | ||
aerie_merlin: | ||
ports: !reset [] | ||
aerie_merlin_worker_1: | ||
ports: !reset [] | ||
aerie_scheduler: | ||
ports: !reset [] | ||
aerie_scheduler_worker_1: | ||
ports: !reset [] | ||
aerie_sequencing: | ||
ports: !reset [] | ||
aerie_ui: | ||
ports: !reset [] | ||
environment: | ||
ORIGIN: https://${AERIE_HOST} | ||
PUBLIC_GATEWAY_CLIENT_URL: https://${AERIE_HOST}:9000 | ||
PUBLIC_HASURA_CLIENT_URL: https://${AERIE_HOST}:8080/v1/graphql | ||
PUBLIC_HASURA_WEB_SOCKET_URL: wss://${AERIE_HOST}:8080/v1/graphql | ||
hasura: | ||
ports: !reset [] | ||
postgres: | ||
ports: !reset [] |
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,51 @@ | ||
# increase max body size for model uploads | ||
client_max_body_size 100M; | ||
|
||
# redirect HTTP to HTTPS (80 -> 443) | ||
server { | ||
listen 80; | ||
server_name _; | ||
return 301 https://$host$request_uri; | ||
} | ||
|
||
# terminate TLS and proxy pass UI | ||
server { | ||
listen 443 ssl; | ||
server_name ${AERIE_HOST}; | ||
ssl_certificate /cert.pem; | ||
ssl_certificate_key /key.pem; | ||
ssl_protocols TLSv1.3; | ||
|
||
location / { | ||
proxy_pass http://aerie_ui; | ||
} | ||
} | ||
|
||
# terminate TLS and proxy pass hasura | ||
server { | ||
listen 8080 ssl; | ||
server_name ${AERIE_HOST}; | ||
ssl_certificate /cert.pem; | ||
ssl_certificate_key /key.pem; | ||
ssl_protocols TLSv1.3; | ||
|
||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "Upgrade"; | ||
|
||
location / { | ||
proxy_pass http://hasura:8080; | ||
} | ||
} | ||
|
||
# terminate TLS and proxy pass gateway | ||
server { | ||
listen 9000 ssl; | ||
server_name ${AERIE_HOST}; | ||
ssl_certificate /cert.pem; | ||
ssl_certificate_key /key.pem; | ||
ssl_protocols TLSv1.3; | ||
|
||
location / { | ||
proxy_pass http://aerie_gateway:9000; | ||
} | ||
} |