A website for VoltVision with e-commerce functionality.
This project is set up to be easily deployed on Render.com using the included render.yaml file.
- A Render.com account (free tier works fine)
- A GitHub/GitLab/Bitbucket repository with this code
-
Push your code to a Git repository
-
On Render dashboard, click "New" and select "Blueprint"
-
Connect to your Git repository and select the repo with this code
-
Render will automatically:
- Create a PostgreSQL database
- Build and deploy your web service using the Dockerfile
- Set up environment variables for the database connection
-
When the deployment is complete, you'll get a URL for your live website
If the automatic database setup fails, you can manually set up the database:
- Visit
https://your-render-url.com/shop/update_schema.phpto create the database tables - This will create all necessary tables in the correct PostgreSQL format
If you encounter SQL errors:
- Check the error message - it likely relates to the difference between MySQL (local) and PostgreSQL (on Render)
- Common issues include:
- Table name quoting: MySQL uses backticks (`), PostgreSQL uses double quotes (")
- LIMIT syntax: MySQL uses
LIMIT x, y, PostgreSQL usesLIMIT y OFFSET x - Date/time functions: MySQL and PostgreSQL have different function names
The codebase includes automatic conversion between MySQL and PostgreSQL syntax, but some complex queries might need manual adjustment.
For local development, you'll need:
- PHP 8.x
- MySQL or PostgreSQL
- Apache/Nginx web server
Configure your database connection in shop/components/connect.php.