This repository contains the MonkeyZ application, ready for deployment to DigitalOcean App Platform.
backend/
- FastAPI backend APIfrontend/
- React frontend application
Before deploying to DigitalOcean, ensure:
- All empty files have been removed or properly initialized
- MongoDB connection is tested and working
- Environment variables are properly configured
- Health check endpoint is implemented in the backend
- Frontend is properly configured to connect to the backend
- Create a new app in DigitalOcean App Platform
- Connect to your GitHub repository
- Select the
backend
directory - Configure environment variables according to
.env.template
- Set build command to
pip install -r requirements.txt
- Set run command to
uvicorn main:app --host 0.0.0.0 --port $PORT
- Deploy the app
- Test the health endpoint at
https://your-app-url/health
- Create a new static site in DigitalOcean App Platform
- Connect to your GitHub repository
- Select the
frontend
directory - Configure environment variables according to
.env.template
- Set build command to
npm install && npm run build
- Set output directory to
build
- Deploy the app
- Verify the site loads correctly
- Create a MongoDB database in DigitalOcean (or use another provider)
- Get the connection string
- Configure the backend with the connection string
- Test the connection using
test_mongodb_connection.py
- Backend health check passes
- Frontend loads correctly
- User authentication works
- Product listings are visible
- API calls between frontend and backend work correctly
If you encounter issues during deployment, check:
- DigitalOcean App Platform logs
- MongoDB connection string format
- Environment variables configuration
- CORS settings for API requests
For more detailed instructions, refer to DIGITALOCEAN_DEPLOYMENT.md
.