Local Development
Learn how to set up your local development environment for Supastarter
This guide will help you set up your local development environment for Supastarter, including the necessary services like PostgreSQL and MinIO S3 storage.
Prerequisites
To run the application locally, you need to have the following:
- Docker and Docker Compose
- Node.js (v18 or later)
- pnpm
Setting Up Local Services
Create a docker-compose.yml
file in your project root with the following configuration:
Starting the Services
- Start the services using Docker Compose:
- Verify that the services are running:
Environment Configuration
Create or update your .env
file with the following configuration:
Accessing the Services
-
PostgreSQL:
- Host: localhost
- Port: 5432
- Username: postgres
- Password: postgres
- Database: supastarter
-
MinIO Console:
- URL: http://localhost:9001
- Username: minioadmin
- Password: minioadmin
Creating the S3 Bucket
- Access the MinIO Console at http://localhost:9001
- Log in with the credentials above
- Click "Create Bucket"
- Name it "avatars"
- Click "Create Bucket"
Start supastarter development server
Start the development server:
Your Supastarter application should now be running with the local PostgreSQL database and MinIO S3 storage.
Troubleshooting
Database Connection Issues
If you're having trouble connecting to PostgreSQL:
- Verify the database is running:
- Check the logs:
S3 Storage Issues
If you're having trouble with S3 storage:
- Verify MinIO is running:
- Check the logs:
- Ensure the bucket exists in the MinIO Console
Stopping the Services
To stop all services:
To stop and remove all data (including volumes):