This document explains how to set up and run the Pingucrew frontend both locally and using Docker Compose.
-
Install Dependencies: Ensure you have Node.js and npm installed. Then, install the required dependencies:
npm install
-
Start the Development Server:
-
For testing purposes using React's Create React App (CRA):
npm start
The application will be available at
http://localhost:3000. -
For a semi-production environment using Webpack:
npm run start-webpack
The application will be available at
http://localhost:3000.
-
-
Build the Application
-
For testing purposes using CRA:
npm run build
The build files will be generated in the
build/directory. -
For production using Webpack:
npm run build-webpack
The build files will be generated in the
dist/directory.
-
-
Build and Start the Container: Use Docker Compose to build and start the frontend container. The Webpack build will be deployed in an NGINX server:
docker-compose up --build
-
Access the Application: Once the container is running, the application will be available at
http://localhost:3000. -
Stop the Container: To stop the container, run:
docker-compose down
- Ensure that the
config/frontend/config.yamlfile is correctly set up before running the application. - For Docker Compose, make sure Docker and Docker Compose are installed on your system.