How to run the web application in other host?
On Horusec, you can make a quick test to understand how the application works and how to adjust it to your environment. It is possible to do it with a virtual machine ou changing the host. To do so, follow the steps below:
Step 1: Install the web application on your environment
If you haven’t installed yet, check out how to install.
Step 2: Check the uninitiated services
Some services are not initiated by default, for example Horusec-Messages and Horusec-Webhook.
After installation, you may notice that some services, by dault, are not initiated. It happens because the services, such as messaging, is configured to be disabled, in case you need to use it, just check out how to enable and disable the messaging service in this tutorial.
Step 3: Configure Horusec-Manager
127.0.0.1
IP, which means that the communication between services will always happen locally.
If you change your machine’s host or install an application on it, it is necessary to reset Horusec-Manager, only then it will understand what is the applications' destiny that you hosted.
To do so:
- Access the service;
- Change the environment variables;
- Restart the application;
Example using docker-compose
When you use the make install
command, it runs the docker-compose.yaml Horusec’s default.
The Horusec-Manager is being executed with the following configuration:
...
horusec-manager:
image: horuszup/horusec-manager:latest
restart: always
container_name: horusec-manager
ports:
- "8043:8080"
environment:
REACT_APP_HORUSEC_ENDPOINT_API: ${REACT_APP_HORUSEC_ENDPOINT_API}
REACT_APP_HORUSEC_ENDPOINT_ANALYTIC: ${REACT_APP_HORUSEC_ENDPOINT_ANALYTIC}
REACT_APP_HORUSEC_ENDPOINT_ACCOUNT: ${REACT_APP_HORUSEC_ENDPOINT_ACCOUNT}
REACT_APP_HORUSEC_ENDPOINT_AUTH: ${REACT_APP_HORUSEC_ENDPOINT_AUTH}
...
Then, you just export the variables related to the services where they are hosted and install Horusec again, for this kind of scenario:
export REACT_APP_HORUSEC_ENDPOINT_API="http:\/\/YOUR_HOST:8000" && \
export REACT_APP_HORUSEC_ENDPOINT_ANALYTIC="http:\/\/YOUR_HOST:8005" && \
export REACT_APP_HORUSEC_ENDPOINT_ACCOUNT="http:\/\/YOUR_HOST:8003" && \
export REACT_APP_HORUSEC_ENDPOINT_AUTH="http:\/\/YOUR_HOST:8006" && \
make install
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.