You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To deploy without using port 80 and ensure the front-end correctly communicates with the backend, you need to make sure the front-end service (agenta-web) is configured to use a different port and that the reverse proxy (traefik) routes traffic appropriately.
Here are the steps to achieve this:
Update docker-compose.yml for agenta-web:
Ensure that the agenta-web service is set to use a different port (e.g., 3001) and that the traefik labels are correctly configured.
Ensure traefik Configuration:
Make sure traefik is configured to route traffic to the correct port. The traefik labels in the docker-compose.yml file should route traffic to port 3000 inside the container.
Update Front-End Environment Variables:
Ensure the front-end is aware of the backend's URL. This can be done through environment variables. For example, set NEXT_PUBLIC_API_URL to point to the backend service:
Check CORS Settings:
Verify that the CORS settings in the config.toml file allow requests from your front-end's origin. The allow_origins configuration should include the origin of your front-end:
Run agenta-web as a Standalone App:
If you are running agenta-web as a standalone NextJS app, you can execute the start_web_standalone.sh script present in the project's root. This approach can sometimes result in lesser CPU usage.
By following these steps, you should be able to deploy without using port 80 and ensure the front-end correctly communicates with the backend. If you still encounter issues, double-check the environment variables and the traefik configuration to ensure everything is set up correctly [1][2][3].
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I try to deploy without using port 80, the front-end keeps requesting the port 80 interface;
When I changed the environment variables for frontend deployment to the backend ports;
(I changed it to nginx deployment here)
Still unable to access, the front-end keeps requesting the interface of port 80;
Is it like this that x modification doesn't work?
Beta Was this translation helpful? Give feedback.
All reactions