A Dockerized playground for developing a design system with Nuxt.js, Vue 3, and Storybook, utilizing the Bun runtime for a streamlined development experience.
- Dockerized Environment: Ensures consistent setup across machines.
- Bun Runtime: Fast and efficient JavaScript runtime.
- Nuxt.js + Vue 3: Build a scalable, performant design system.
- Storybook Integration: Develop UI components in isolation.
- Makefile Automation: Simplifies Docker commands for easy management.
Ensure the following are installed:
- Docker (latest version)
- Docker Compose (latest version)
- Make (usually pre-installed on UNIX systems)
/project-root
β
βββ Makefile
βββ docker-compose.yml
βββ Dockerfile
βββ .env
βββ entrypoint.sh
βββ app/
βββ [Your project files]
Follow these steps to set up the environment:
git clone https://github.com/yourusername/plant-assistant.git
cd plant-assistant
In the root directory, create a .env
file with the following content:
# .env
SERVICE_NAME=design-system
IMAGE=design-system:latest
NODE_ENV=development
HOST=0.0.0.0
make build
chmod +x entrypoint.sh
make up
If the app
directory is empty, the container will start and wait, allowing you to initialize your project.
Use the Makefile for easy management of Docker services:
Command | Description |
---|---|
make build |
Build the Docker images |
make up |
Start the services in detached mode |
make upb |
Start with build |
make down |
Stop all services |
make bash |
Enter the containerβs shell |
make logs |
View logs |
make clean |
Remove all containers, images, volumes, and orphans |
Example Commands:
-
Initialize the Project:
make init
-
Enter the Container's Shell:
make bash
-
Access Your Application:
After initializing the project, access it at http://localhost:3000.
-
Build and Start Services:
make build make up
-
Initialize Nuxt.js Project:
make bash # Inside container: bun init
-
Manage Services:
- View logs:
make logs
- Restart services:
make restart
- Stop services:
make down
- View logs:
- 3000: Nuxt.js development server
- 6006: Storybook
Defined in the .env
file:
- SERVICE_NAME: Service name
- IMAGE: Docker image name
- NODE_ENV: Node environment
- HOST: Host address (
0.0.0.0
)
-
Permission Denied for
entrypoint.sh
: Ensure the script has execute permissions:chmod +x entrypoint.sh
-
Ports Already in Use: Modify
docker-compose.yml
if ports are in use.
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.
Made with β€οΈ by lafllamme