Project to make reverse proxy using node. This project was made to be deploy with node 16 if it's necessary you can change the version of node updating the package.json and Dockerfile image in the Dockerfile
To deploy the project you will need to create a .env file in the root project directory with the following variables (the default values to these variables will be in the example):
- PORT: Define in which port the app will being listen
- TARGET_URL: URL to which the proxy will redirect the trafic
# EXAMPLE
PORT=3000
TARGET_URL=http://localhostTo deploy the project with node you will have to execute the following commands in the terminal
node app.jsTo deploy the project with docker compose you will have add the following variable to .env file:
- DOCKER_PORT: Define which port the service will have to use to expose itself
DOCKER_PORT=3000And execute the following commands in the terminal
# Build or rebuild the service
docker compose build
# Create and start the container
docker compose up If you prefer only use the docker image you can use the file compose.prod.yml which will deploy the proxy-node project using the image on hub.docker.com using the following command
# Create and starte the container using the file compose.prod.yml
docker compose -f compose.prod.yml upOr using docker directly like this
docker run rodamianro/util:proxy-node