This README provides detailed instructions and information about the services configured for this project version 3.8.
This project is a full-stack web application with a backend API and a frontend application. The backend is built with Node.js, while the frontend is built with a modern JavaScript framework. This README will guide you through the setup and running of these services using Docker.
Note: This project is designed to be run using Docker. Running the services outside of Docker may not be supported and could lead to issues.
- Directory:
./api - Build Context:
api - Ports: Exposes port
3005on the host to port3005in the container. - Volumes:
- Mounts
./apidirectory to/appin the container. - Mounts
/app/node_modulesas a volume to handle dependencies.
- Mounts
- Environment: Sets
NODE_ENVtodevelopment. - Command: Runs
yarn start:devto start the development server. - Documentation: API documentation can be found at http://localhost:3005/api-docs.
- Directory:
./frontend - Build Context:
frontend - Ports: Exposes port
3001and3000on the host to ports3001and3000in the container. - Volumes:
- Mounts
./frontenddirectory to/appin the container. - Mounts
/app/node_modulesas a volume to handle dependencies.
- Mounts
- Environment: Sets
NODE_ENVtodevelopment. - Command: Runs
yarn startto start the frontend development server. - Depends On: Depends on the
apiservice to be running. - Documentation: Frontend documentation (including Storybook if enabled) can be found at http://localhost:6006/.
- Directory:
./frontend - Build Context:
frontend - Ports: Exposes port
6006on the host to port6006in the container. - Volumes:
- Mounts
./frontenddirectory to/appin the container. - Mounts
/app/node_modulesas a volume to handle dependencies.
- Mounts
- Depends On: Depends on the
appservice to be running. - Documentation: Storybook documentation can be found at http://localhost:6006/.
- Docker and Docker Compose installed on your machine.
- Yarn package manager installed globally.
To start the services, use Docker Compose:
-
Navigate to the project directory where the
docker-compose.ymlfile is located:cd /path/to/your/project -
Start the services:
docker-compose up
This command will build and start all the services defined in the
docker-compose.ymlfile. Docker Compose will pull the necessary images (if they are not already available locally), build the images, and start the containers. -
Access the services:
- API Service: http://localhost:3005
- Frontend Service: http://localhost:3000
- Storybook Service (if enabled): http://localhost:6006
Note: Ensure that the api service is running before starting the app service, and that the app service is running before starting the storybook service if you choose to enable it.
- Stop the services:
To stop the running services, press
Ctrl+Cin the terminal wheredocker-compose upis running. You can also run:This command will stop and remove the containers created bydocker-compose down
docker-compose up.
Note: This project must be run using Docker. Running the services outside of Docker may not be supported and could lead to issues.
Detailed information on required environment variables can be added here if needed.
- API Service: Mounts
./apiand/app/node_modulesvolumes. - App Service: Mounts
./frontendand/app/node_modulesvolumes.
- API Service: Exposes port
3005. - App Service: Exposes ports
3000and3001. - Storybook Service: Exposes port
6006.