diff --git a/Nginx/default.conf.template b/Nginx/default.conf.template index ee3729ef51..926e069c26 100644 --- a/Nginx/default.conf.template +++ b/Nginx/default.conf.template @@ -1,59 +1,59 @@ upstream accounts { - server accounts:3003 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_ACCOUNTS_HOSTNAME}:${ACCOUNTS_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream identity { - server identity:3087 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_IDENTITY_HOSTNAME}:${IDENTITY_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream file { - server file:3125 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_FILE_HOSTNAME}:${FILE_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream dashboard-api { - server dashboard-api:3002 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_DASHBAORD_API_HOSTNAME}:${DASHBOARD_API_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream workflow { - server workflow:3099 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_WORKFLOW_HOSTNAME}:${WORKFLOW_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream link-shortener { - server link-shortener:3521 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_LINK_SHORTENER_HOSTNAME}:${LINK_SHORTENER_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream api-reference { - server api-reference:1445 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_API_REFERENCE_HOSTNAME}:${API_REFERENCE_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream probe-api { - server probe-api:3400 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_PROBE_API_HOSTNAME}:${PROBE_API_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream dashboard { - server dashboard:3009 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_DASHBOARD_HOSTNAME}:${DASHBOARD_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream admin-dashboard { - server admin-dashboard:3158 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_ADMIN_DASHBOARD_HOSTNAME}:${ADMIN_DASHBOARD_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream status-page { - server status-page:3105 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_STATUS_PAGE_HOSTNAME}:${STATUS_PAGE_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream home { - server home:1444 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_HOME_HOSTNAME}:${HOME_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream workers { - server workers:3452 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_WORKERS_HOSTNAME}:${WORKERS_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream notification { - server notification:3191 weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_NOTIFICATION_HOSTNAME}:${NOTIFICATION_PORT} weight=10 max_fails=3 fail_timeout=30s; } diff --git a/config.example.env b/config.example.env index 025a1e78f5..187a84273a 100644 --- a/config.example.env +++ b/config.example.env @@ -75,10 +75,28 @@ REDIS_TLS_SENTINEL_MODE=false # Hostnames. Usually does not need to change. PROBE_API_HOSTNAME=probe-api:3400 +SERVER_ACCOUNTS_HOSTNAME=accounts +SERVER_REALTIME_HOSTNAME=realtime +SERVER_DASHBOARD_API_HOSTNAME=dashboard-api +SERVER_WORKFLOW_HOSTNAME=workflow +SERVER_LINK_SHORTENER_HOSTNAME=link-shortener +SERVER_ALERT_HOSTNAME=alert +SERVER_PROBE_API_HOSTNAME=probe-api +SERVER_TEST_SERVER_HOSTNAME=test-server +SERVER_FILE_HOSTNAME=file +SERVER_HOME_HOSTNAME=home +SERVER_IDENTITY_HOSTNAME=identity +SERVER_NOTIFICAITON_HOSTNAME=hostname +SERVER_WORKERS_HOSTNAME=workers +SERVER_STATUS_PAGE_HOSTNAME=status-page +SERVER_DASHBOARD_HOSTNAME=dashboard +SERVER_ADMIN_DASHBOARD_HOSTNAME=admin-dashboard +SERVER_API_REFERENCE_HOSTNAME=api-reference + #Ports. Usually they don't need to change. DASHBOARD_API_PORT=3002 -API_DOCS_PORT=1445 +API_REFERENCE_PORT=1445 WORKFLOW_PORT=3099 LINK_SHORTENER_PORT=3521 ALERT_PORT=3088 @@ -166,3 +184,4 @@ BILLING_PRIVATE_KEY= # Use this when you want to disable incident creation. DISABLE_AUTOMATIC_INCIDENT_CREATION=false + diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 01cb9a6c88..261639dfad 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -57,6 +57,46 @@ x-common-server-variables: &common-server-variables DISABLE_AUTOMATIC_INCIDENT_CREATION: ${DISABLE_AUTOMATIC_INCIDENT_CREATION} + SERVER_ACCOUNTS_HOSTNAME: ${SERVER_ACCOUNTS_HOSTNAME} + SERVER_REALTIME_HOSTNAME: ${SERVER_REALTIME_HOSTNAME} + SERVER_DASHBOARD_API_HOSTNAME: ${SERVER_DASHBOARD_API_HOSTNAME} + SERVER_WORKFLOW_HOSTNAME: ${SERVER_WORKFLOW_HOSTNAME} + SERVER_LINK_SHORTENER_HOSTNAME: ${SERVER_LINK_SHORTENER_HOSTNAME} + SERVER_ALERT_HOSTNAME: ${SERVER_ALERT_HOSTNAME} + SERVER_PROBE_API_HOSTNAME: ${SERVER_PROBE_API_HOSTNAME} + SERVER_TEST_SERVER_HOSTNAME: ${SERVER_TEST_SERVER_HOSTNAME} + SERVER_FILE_HOSTNAME: ${SERVER_FILE_HOSTNAME} + SERVER_HOME_HOSTNAME: ${SERVER_HOME_HOSTNAME} + SERVER_IDENTITY_HOSTNAME: ${SERVER_IDENTITY_HOSTNAME} + SERVER_NOTIFICAITON_HOSTNAME: ${SERVER_NOTIFICAITON_HOSTNAME} + SERVER_WORKERS_HOSTNAME: ${SERVER_WORKERS_HOSTNAME} + SERVER_STATUS_PAGE_HOSTNAME: ${SERVER_STATUS_PAGE_HOSTNAME} + SERVER_DASHBOARD_HOSTNAME: ${SERVER_DASHBOARD_HOSTNAME} + SERVER_ADMIN_DASHBOARD_HOSTNAME: ${SERVER_ADMIN_DASHBOARD_HOSTNAME} + SERVER_API_REFERENCE_HOSTNAME: ${SERVER_API_REFERENCE_HOSTNAME} + + + #Ports. Usually they don't need to change. + DASHBOARD_API_PORT: ${DASHBOARD_API_PORT} + API_REFERENCE_PORT: ${API_REFERENCE_PORT} + WORKFLOW_PORT: ${WORKFLOW_PORT} + LINK_SHORTENER_PORT: ${LINK_SHORTENER_PORT} + ALERT_PORT: ${ALERT_PORT} + PROBE_API_PORT: ${PROBE_API_PORT} + PROBE_PORT: ${PROBE_PORT} + TEST_SERVER_PORT: ${TEST_SERVER_PORT} + FILE_PORT: ${FILE_PORT} + HOME_PORT: ${HOME_PORT} + IDENTITY_PORT: ${IDENTITY_PORT} + NOTIFICATION_PORT: ${NOTIFICATION_PORT} + REALTIME_PORT: ${REALTIME_PORT} + WORKERS_PORT: ${WORKERS_PORT} + ACCOUNTS_PORT: ${ACCOUNTS_PORT} + STATUS_PAGE_PORT: ${STATUS_PAGE_PORT} + DASHBOARD_PORT: ${DASHBOARD_PORT} + ADMIN_DASHBOARD_PORT: ${ADMIN_DASHBOARD_PORT} + + services: minio: @@ -360,7 +400,7 @@ services: restart: always environment: <<: *common-ui-variables - PORT: ${API_DOCS_PORT} + PORT: ${API_REFERENCE_PORT} ingress: