diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml index e8741a4bf..0df3cd1fd 100644 --- a/docker-compose.staging.yml +++ b/docker-compose.staging.yml @@ -74,8 +74,8 @@ services: JWT_SECRET: ${JWT_SECRET} JWT_PUBLIC_KEY: ${JWT_PUBLIC_KEY} JWT_PRIVATE_KEY: ${JWT_PRIVATE_KEY} - # CORS - Allow all staging web app origins - CORS_ORIGINS: http://46.224.108.214:3000,http://46.224.108.214:5173,http://46.224.108.214:5186,http://46.224.108.214:5187,http://46.224.108.214:5188,http://localhost:3000,http://localhost:5173,http://localhost:5186,http://localhost:5187,http://localhost:5188 + # CORS - Allow all staging web app origins (HTTPS domains + localhost for dev) + CORS_ORIGINS: https://chat.staging.manacore.ai,https://staging.manacore.ai,https://calendar.staging.manacore.ai,https://clock.staging.manacore.ai,https://todo.staging.manacore.ai,http://localhost:3000,http://localhost:5173,http://localhost:5186,http://localhost:5187,http://localhost:5188 ports: - "3001:3001" healthcheck: @@ -140,9 +140,9 @@ services: # Server-side URLs (Docker internal network) PUBLIC_BACKEND_URL: http://chat-backend:3002 PUBLIC_MANA_CORE_AUTH_URL: http://mana-core-auth:3001 - # Client-side URLs (browser access via public IP) - PUBLIC_BACKEND_URL_CLIENT: http://46.224.108.214:3002 - PUBLIC_MANA_CORE_AUTH_URL_CLIENT: http://46.224.108.214:3001 + # Client-side URLs (browser access via HTTPS staging domains) + PUBLIC_BACKEND_URL_CLIENT: https://chat-api.staging.manacore.ai + PUBLIC_MANA_CORE_AUTH_URL_CLIENT: https://auth.staging.manacore.ai ports: - "3000:3000" healthcheck: @@ -175,14 +175,14 @@ services: PORT: 5173 # Auth URLs PUBLIC_MANA_CORE_AUTH_URL: http://mana-core-auth:3001 - PUBLIC_MANA_CORE_AUTH_URL_CLIENT: http://46.224.108.214:3001 + PUBLIC_MANA_CORE_AUTH_URL_CLIENT: https://auth.staging.manacore.ai # Backend URLs for dashboard widgets PUBLIC_TODO_API_URL: http://todo-backend:3018 - PUBLIC_TODO_API_URL_CLIENT: http://46.224.108.214:3018 + PUBLIC_TODO_API_URL_CLIENT: https://todo-api.staging.manacore.ai PUBLIC_CALENDAR_API_URL: http://calendar-backend:3016 - PUBLIC_CALENDAR_API_URL_CLIENT: http://46.224.108.214:3016 + PUBLIC_CALENDAR_API_URL_CLIENT: https://calendar-api.staging.manacore.ai PUBLIC_CLOCK_API_URL: http://clock-backend:3017 - PUBLIC_CLOCK_API_URL_CLIENT: http://46.224.108.214:3017 + PUBLIC_CLOCK_API_URL_CLIENT: https://clock-api.staging.manacore.ai ports: - "5173:5173" healthcheck: @@ -220,7 +220,7 @@ services: DB_PORT: 5432 DB_USER: ${POSTGRES_USER:-postgres} MANA_CORE_AUTH_URL: http://mana-core-auth:3001 - CORS_ORIGINS: http://46.224.108.214:5188,http://46.224.108.214:5173,http://localhost:5188,http://localhost:5173 + CORS_ORIGINS: https://todo.staging.manacore.ai,https://staging.manacore.ai,http://localhost:5188,http://localhost:5173 ports: - "3018:3018" healthcheck: @@ -249,8 +249,8 @@ services: PORT: 5188 PUBLIC_BACKEND_URL: http://todo-backend:3018 PUBLIC_MANA_CORE_AUTH_URL: http://mana-core-auth:3001 - PUBLIC_BACKEND_URL_CLIENT: http://46.224.108.214:3018 - PUBLIC_MANA_CORE_AUTH_URL_CLIENT: http://46.224.108.214:3001 + PUBLIC_BACKEND_URL_CLIENT: https://todo-api.staging.manacore.ai + PUBLIC_MANA_CORE_AUTH_URL_CLIENT: https://auth.staging.manacore.ai ports: - "5188:5188" healthcheck: @@ -288,7 +288,7 @@ services: DB_PORT: 5432 DB_USER: ${POSTGRES_USER:-postgres} MANA_CORE_AUTH_URL: http://mana-core-auth:3001 - CORS_ORIGINS: http://46.224.108.214:5186,http://46.224.108.214:5173,http://localhost:5186,http://localhost:5173 + CORS_ORIGINS: https://calendar.staging.manacore.ai,https://staging.manacore.ai,http://localhost:5186,http://localhost:5173 ports: - "3016:3016" healthcheck: @@ -317,8 +317,8 @@ services: PORT: 5186 PUBLIC_BACKEND_URL: http://calendar-backend:3016 PUBLIC_MANA_CORE_AUTH_URL: http://mana-core-auth:3001 - PUBLIC_BACKEND_URL_CLIENT: http://46.224.108.214:3016 - PUBLIC_MANA_CORE_AUTH_URL_CLIENT: http://46.224.108.214:3001 + PUBLIC_BACKEND_URL_CLIENT: https://calendar-api.staging.manacore.ai + PUBLIC_MANA_CORE_AUTH_URL_CLIENT: https://auth.staging.manacore.ai ports: - "5186:5186" healthcheck: @@ -356,7 +356,7 @@ services: DB_PORT: 5432 DB_USER: ${POSTGRES_USER:-postgres} MANA_CORE_AUTH_URL: http://mana-core-auth:3001 - CORS_ORIGINS: http://46.224.108.214:5187,http://46.224.108.214:5173,http://localhost:5187,http://localhost:5173 + CORS_ORIGINS: https://clock.staging.manacore.ai,https://staging.manacore.ai,http://localhost:5187,http://localhost:5173 ports: - "3017:3017" healthcheck: @@ -385,8 +385,8 @@ services: PORT: 5187 PUBLIC_BACKEND_URL: http://clock-backend:3017 PUBLIC_MANA_CORE_AUTH_URL: http://mana-core-auth:3001 - PUBLIC_BACKEND_URL_CLIENT: http://46.224.108.214:3017 - PUBLIC_MANA_CORE_AUTH_URL_CLIENT: http://46.224.108.214:3001 + PUBLIC_BACKEND_URL_CLIENT: https://clock-api.staging.manacore.ai + PUBLIC_MANA_CORE_AUTH_URL_CLIENT: https://auth.staging.manacore.ai ports: - "5187:5187" healthcheck: diff --git a/docker/caddy/Caddyfile.staging b/docker/caddy/Caddyfile.staging new file mode 100644 index 000000000..78d90ed12 --- /dev/null +++ b/docker/caddy/Caddyfile.staging @@ -0,0 +1,45 @@ +# ManaCore Staging Reverse Proxy +# Deploy to: ~/Caddyfile on staging server (46.224.108.214) +# Reload with: docker exec caddy caddy reload --config /etc/caddy/Caddyfile + +# Auth service +auth.staging.manacore.ai { + reverse_proxy localhost:3001 +} + +# Chat +chat.staging.manacore.ai { + reverse_proxy localhost:3000 +} +chat-api.staging.manacore.ai { + reverse_proxy localhost:3002 +} + +# ManaCore main +staging.manacore.ai { + reverse_proxy localhost:5173 +} + +# Calendar +calendar.staging.manacore.ai { + reverse_proxy localhost:5186 +} +calendar-api.staging.manacore.ai { + reverse_proxy localhost:3016 +} + +# Clock +clock.staging.manacore.ai { + reverse_proxy localhost:5187 +} +clock-api.staging.manacore.ai { + reverse_proxy localhost:3017 +} + +# Todo +todo.staging.manacore.ai { + reverse_proxy localhost:5188 +} +todo-api.staging.manacore.ai { + reverse_proxy localhost:3018 +}