diff --git a/docs/concepts/ui.rst b/docs/concepts/ui.rst index ae7a88256..b8e923734 100644 --- a/docs/concepts/ui.rst +++ b/docs/concepts/ui.rst @@ -61,17 +61,9 @@ This will do the following: 3. Start the backend server 4. Start the frontend server -This takes a bit of time! So be patient. The server will be running on port 3000 -- in the logs you'll see something like this: +This takes a bit of time! So be patient. The server will be running on port 8242 -- in the logs you'll see something like this: -.. code-block:: bash - - 2024-04-18 15:57:07 You can now view frontend in the browser. - 2024-04-18 15:57:07 - 2024-04-18 15:57:07 Local: http://localhost:3000 - 2024-04-18 15:57:07 On Your Network: http://172.19.0.4:3000 - - -Then navigate to ``http://localhost:3000`` in your browser, and enter your email (this will be the username used within the app). +Then navigate to ``http://localhost:8242`` in your browser, and enter your email (this will be the username used within the app). Building the Docker Images locally __________________________________ diff --git a/ui/backend/server/entrypoint.sh b/ui/backend/server/entrypoint.sh index 8c298fa52..3a3329f1c 100755 --- a/ui/backend/server/entrypoint.sh +++ b/ui/backend/server/entrypoint.sh @@ -1,4 +1,4 @@ set -e python manage.py migrate # Apply database migrations -python manage.py runserver 0.0.0.0:8000 # Start the server +python manage.py runserver 0.0.0.0:8241 # Start the server diff --git a/ui/backend/server/server/default_views.py b/ui/backend/server/server/default_views.py index 8ba688c18..531473234 100644 --- a/ui/backend/server/server/default_views.py +++ b/ui/backend/server/server/default_views.py @@ -9,6 +9,7 @@ def root_index(request) -> HttpResponse:

Welcome to the backend server!

+

Did you mean to visit the frontend? Note this sometimes takes a bit of time to start up.

""" diff --git a/ui/deployment/Dockerfile.frontend b/ui/deployment/Dockerfile.frontend index 33c081eb9..a911ffee0 100644 --- a/ui/deployment/Dockerfile.frontend +++ b/ui/deployment/Dockerfile.frontend @@ -24,6 +24,8 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" RUN npm run build -EXPOSE 3000 +EXPOSE 8242 + +ENV PORT=8242 CMD ["npm", "run", "start"] diff --git a/ui/deployment/Dockerfile.frontend-prod b/ui/deployment/Dockerfile.frontend-prod index 6a69cf994..670ad0459 100644 --- a/ui/deployment/Dockerfile.frontend-prod +++ b/ui/deployment/Dockerfile.frontend-prod @@ -31,12 +31,12 @@ FROM nginx:stable-alpine as production-stage COPY --from=build-stage /usr/src/app/build /usr/share/nginx/html # Expose port 80 to the outside once the container has launched -EXPOSE 3000 +EXPOSE 8242 # Use the default nginx.conf provided by tiangolo/nginx-rtmp COPY ./deployment/nginx/nginx.conf /etc/nginx/nginx.conf -CMD ["echo", "Frontend running on port 3000, go to http://localhost:3000 to view the app."] +CMD ["echo", "Frontend running on port 8242, go to http://localhost:8242 to view the app."] # Start Nginx and keep the process from backgrounding and the container from quitting CMD ["nginx", "-g", "daemon off;"] diff --git a/ui/deployment/docker-compose-prod.yml b/ui/deployment/docker-compose-prod.yml index e0e1c23d0..42264bcc8 100644 --- a/ui/deployment/docker-compose-prod.yml +++ b/ui/deployment/docker-compose-prod.yml @@ -23,7 +23,7 @@ services: dockerfile: deployment/Dockerfile.backend-prod entrypoint: ["/bin/bash", "-c", "cd /code/server && ls && ./entrypoint.sh"] ports: - - "8000:8000" + - "8241:8241" environment: - DB_HOST=db - DB_PORT=5432 @@ -49,7 +49,7 @@ services: - REACT_APP_AUTH_MODE=local - REACT_APP_USE_POSTHOG=false ports: - - "3000:3000" + - "8242:8242" environment: - NODE_ENV=development - REACT_APP_AUTH_MODE=local diff --git a/ui/deployment/docker-compose.yml b/ui/deployment/docker-compose.yml index ec987c591..ff1f654cf 100644 --- a/ui/deployment/docker-compose.yml +++ b/ui/deployment/docker-compose.yml @@ -25,7 +25,7 @@ services: - ./backend:/code - backend_data:/data/ ports: - - "8000:8000" + - "8241:8241" environment: - DB_HOST=db - DB_PORT=5432 @@ -52,12 +52,12 @@ services: - ./frontend:/usr/src/app - /usr/src/app/node_modules ports: - - "3000:3000" + - "8242:8242" environment: - NODE_ENV=development - REACT_APP_AUTH_MODE=local - REACT_APP_USE_POSTHOG=false - - REACT_APP_API_URL=http://backend:8000 + - REACT_APP_API_URL=http://backend:8241 depends_on: - backend diff --git a/ui/deployment/nginx/nginx.conf b/ui/deployment/nginx/nginx.conf index e0e65560a..4053d44ea 100644 --- a/ui/deployment/nginx/nginx.conf +++ b/ui/deployment/nginx/nginx.conf @@ -7,7 +7,7 @@ http { default_type application/octet-stream; server { - listen 3000; + listen 8242; server_name localhost; root /usr/share/nginx/html; # Common root for all files. @@ -23,7 +23,7 @@ http { # Proxy /api requests to backend location /api { - proxy_pass http://backend:8000; # Assuming the API server is on the same host + proxy_pass http://backend:8241; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -32,7 +32,7 @@ http { 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_read_timeout 5000; # Timeout setting as per your node configuration + proxy_read_timeout 5000; } } } diff --git a/ui/frontend/.env.local b/ui/frontend/.env.local index 54ee785ef..3076f787b 100644 --- a/ui/frontend/.env.local +++ b/ui/frontend/.env.local @@ -1,3 +1,3 @@ -REACT_APP_API_URL=localhost:8000 +REACT_APP_API_URL=localhost:8241 REACT_APP_USE_POSTHOG=false REACT_APP_AUTH_MODE=local diff --git a/ui/sdk/src/hamilton_sdk/api/constants.py b/ui/sdk/src/hamilton_sdk/api/constants.py index 152054451..fa95325cd 100644 --- a/ui/sdk/src/hamilton_sdk/api/constants.py +++ b/ui/sdk/src/hamilton_sdk/api/constants.py @@ -1,2 +1,2 @@ -HAMILTON_API_URL = "http://localhost:8000" -HAMILTON_UI_URL = "http://localhost:3000" +HAMILTON_API_URL = "http://localhost:8241" +HAMILTON_UI_URL = "http://localhost:8242"