This web app was built using React.js library to create a UI that generates pictures of cats for people who want to see them and people who don't.
This application can be easily containerized using Docker. Below are instructions on how to build, pull, and run the Docker image.
-
Make sure you have Docker and Docker Compose installed on your system.
-
Clone this repository to your local machine:
git clone https://github.com/nikolina2k/core-course-labs.git -
Navigate to the project directory:
cd core-course-labs cd app_typescript cd cat-pics -
Build and run the Docker image using Docker Compose:
docker-compose up -d --build -
Or pull the Docker Image from existing repo on Docker hub:
docker pull nikolina2k/cat-pics -
Run the Docker Container:
docker run -p 3001:80 nikolina2k/cat-pics
The application will be accessible at http://localhost:3001 in your web browser.
To run the unit tests, follow these steps:
-
Install dependencies:
npm install -
Run the unit tests using the following command:
npm run test
The following secrets need to be specified in order to run the pipeline:
- DOCKER_PASSWORD - DockerHub password (or token).
- DOCKER_USERNAME - DockerHub username.
- SNYK_TOKEN - Snyk token.