Skip to content

Commit

Permalink
fix: optional services
Browse files Browse the repository at this point in the history
  • Loading branch information
speed2exe committed Jan 15, 2024
1 parent 141f682 commit 994e99e
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ events {

http {
# docker dns resolver
resolver 127.0.0.11 valid=30s;
resolver 127.0.0.11 valid=10s;

map $http_upgrade $connection_upgrade {
default upgrade;
Expand Down Expand Up @@ -36,8 +36,8 @@ http {

# GoTrue
location /gotrue/ {
set $backend "http://gotrue:9999";
proxy_pass $backend;
set $gotrue gotrue;
proxy_pass http://$gotrue:9999;

rewrite ^/gotrue(/.*)$ $1 break;

Expand All @@ -49,8 +49,8 @@ http {

# WebSocket
location /ws {
set $backend "http://appflowy_cloud:8000";
proxy_pass $backend;
set $appflowy_cloud appflowy_cloud;
proxy_pass http://$appflowy_cloud:8000;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
Expand All @@ -61,8 +61,8 @@ http {

# AppFlowy-Cloud
location /api {
set $backend "http://appflowy_cloud:8000";
proxy_pass $backend;
set $appflowy_cloud appflowy_cloud;
proxy_pass http://$appflowy_cloud:8000;

proxy_set_header X-Request-Id $request_id;
}
Expand All @@ -71,6 +71,9 @@ http {
# Derive from: https://min.io/docs/minio/linux/integrations/setup-nginx-proxy-with-minio.html
# Optional Module, comment this section if you are did not deploy minio in docker-compose.yml
location /minio/ {
set $minio minio;
proxy_pass http://$minio:9001;

rewrite ^/minio/(.*) /$1 break;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -92,16 +95,13 @@ http {
# proxy_set_header Origin '';

chunked_transfer_encoding off;

set $backend "http://minio:9001";
proxy_pass $backend;
}

# PgAdmin
# Optional Module, comment this section if you are did not deploy pgadmin in docker-compose.yml
location /pgadmin/ {
set $backend "http://pgadmin:80/";
proxy_pass $backend;
set $pgadmin pgadmin;
proxy_pass http://$pgadmin:80;

proxy_set_header X-Script-Name /pgadmin;
proxy_set_header X-Scheme $scheme;
Expand All @@ -112,18 +112,20 @@ http {
# Portainer
# Optional Module, comment this section if you are did not deploy portainer in docker-compose.yml
location /portainer/ {
set $backend "http://portainer:9000/";
proxy_pass $backend;
set $portainer portainer;
proxy_pass http://$portainer:9000;

rewrite ^/portainer/(.*) /$1 break;
}

# Admin Frontend
# Optional Module, comment this section if you are did not deploy admin_frontend in docker-compose.yml
location / {
set $admin_frontend admin_frontend;
proxy_pass http://$admin_frontend:3000;

proxy_set_header X-Scheme $scheme;
proxy_set_header Host $host;

set $backend "http://admin_frontend:3000";
proxy_pass $backend;
}
}

Expand Down

0 comments on commit 994e99e

Please sign in to comment.