In the project directory, you can run:
Runs the express server in the development mode. Naviagate http://localhost:3000 to view it in the browser.
- Ensure this repo i.e.FunTown-Server and FunTown-Web-App are moved to a common root directory
- Move the
docker-compose.yml
to the top level of directory Then run the following command;
This builds and automatically runs both the images in dev environment using Dockerfile.dev
. This already defines the port mapping. Therefore, naviagate http://localhost:3000 to view it in the browser.
To use an existing image, run the following commands
docker pull ronaksharma/multi-funtownserver
docker run -p 5000:5000 ronaksharma/multi-funtownserver
To create a new image, run the following commands
docker login
docker build -t givenName .
: UsesDockerfile
to create a production build. For this both prod and dev Dockerfiles are samedocker push
: Pushes image to DockerHubdocker run -p 5000:5000 givenName
: Runs the image using nginx server on port 3000 (localhost:docker)
Note: This will push the image to your dockerHub and will not update the existing image
To test any running image you can call the BoredApi
without requiring an api-key as follows;
http://localhost:5000/boredApi?numberOfParticipants=2