Built with React.js 18.2.0
-
Create a
.env
file and add the following:NNODE_ENV=<ENV> API_URL=<API_BASE_URL>
where:
NODE_ENV
=development
orproduction
API_URL
=http://localhost:5000/api/v1
-
Install dependencies:
npm install
-
Run application:
npm run start
Command: npm run build
Docker command: docker build -t <IMAGE>:<TAG> .
Note:
Follow semantic versioning scheme X.Y.Z
for image <TAG>
.
Command: npm run start:prod
Docker command: docker run --name=<CONTAINER_NAME> [-e <ENV_VAR_NAME>=<ENV_VAR_VALUE>] [-v <HOST_PATH>:<CONTAINER_PATH>] -dp <HOST_PORT>:<CONTAINER_PORT> <IMAGE>:<TAG>
Note: Provide environment variables and mount required files using -e
and -v
options. Refer: docker run | Docker Docs