A full-stack personal website built with React, Vite, and Supabase, deployable locally with Docker Compose.
- Docker and Docker Compose
- Git
-
Clone the repository
git clone https://github.com/nkbud/personal-website.git cd personal-website
-
Start the application
docker-compose up
This will start both the frontend and Supabase backend services.
-
Access the application
- Frontend: http://localhost:5173
- Supabase Studio: http://localhost:3000 (Database dashboard)
- Supabase API: http://localhost:8000
For convenience, use the included dev.sh
script:
# Make the script executable
chmod +x dev.sh
# Start all services
./dev.sh start
# Stop all services
./dev.sh stop
# View logs
./dev.sh logs
# Reset everything (removes all data)
./dev.sh reset
# See all available commands
./dev.sh help
# Start all services in the background
docker compose up -d
# View logs for all services
docker compose logs -f
# View logs for specific service
docker compose logs -f frontend
# Stop all services
docker compose down
# Stop and remove volumes (reset database)
docker compose down -v
# Rebuild containers
docker compose build --no-cache
The frontend supports hot reloading out of the box. Any changes to your React code will automatically refresh the browser.
- Access Supabase Studio at http://localhost:3000 to manage your database
- Default credentials are configured for local development
- Database data persists between restarts in Docker volumes
The application uses environment variables for configuration. Default values are provided in .env.local
for local development.
Key configuration options:
VITE_SUPABASE_URL
: Supabase API URL (defaults to local: http://localhost:8000)VITE_SUPABASE_ANON_KEY
: Supabase anonymous keyPOSTGRES_PASSWORD
: Database passwordJWT_SECRET
: JWT signing secret
This application consists of:
- React 18 with Vite for fast development
- Tailwind CSS for styling
- Radix UI components
- Framer Motion for animations
- React Router for navigation
- PostgreSQL database
- PostgREST for automatic API generation
- GoTrue for authentication
- Realtime for live updates
- Storage for file management
For production deployment, see the supabase/ directory which contains Terraform and Packer configurations for deploying to DigitalOcean.
# Validate your setup
./dev.sh validate
If you encounter port conflicts, you can modify the ports in docker-compose.yml
:
- Frontend: Change
5173:5173
to[new-port]:5173
- Supabase API: Change
8000:8000
to[new-port]:8000
- Supabase Studio: Change
3000:3000
to[new-port]:3000
- Database: Change
5432:5432
to[new-port]:5432
# Reset the database completely
./dev.sh reset
# Access database directly
docker compose exec db psql -U postgres
# Check database status
docker compose logs db
# Rebuild containers from scratch
docker compose down
docker compose build --no-cache
docker compose up
# Check container status
docker compose ps
# View detailed logs
docker compose logs -f [service-name]
Make sure you have a .env
file in the root directory. Copy from .env.example
:
cp .env.example .env
If containers are failing due to memory constraints:
- Increase Docker Desktop memory allocation (recommended: 4GB+)
- Close other resource-intensive applications
- Try starting services individually:
docker compose up db # Start database first docker compose up kong # Then API gateway docker compose up frontend # Finally frontend
Check if services are healthy:
# View service status
docker compose ps
# Check specific service health
docker compose exec [service-name] healthcheck
- Fork the repository
- Create a feature branch
- Make your changes
- Test locally with
docker-compose up
- Submit a pull request