This guide outlines the process of setting up a staging environment for the Dropship V2 project.
- A separate server or hosting environment for staging
- Access to a staging database
-
Clone the repository on your staging server:
git clone https://github.com/CrzyHAX91/dropshipv2.git cd dropshipv2
-
Create a new branch for staging:
git checkout -b staging
-
Set up environment variables for staging.
-
Install dependencies:
pip install -r requirements.txt
-
Run database migrations:
python manage.py migrate
-
Collect static files:
python manage.py collectstatic
-
Set up a process manager to run the application.
-
Configure your web server to serve the application.
-
Push changes to the staging branch:
git push origin staging
-
On your staging server, pull the changes:
git pull origin staging
-
Restart your application server.
- Perform thorough testing of all features in the staging environment.
- Test with a copy of production data (anonymize sensitive information).
- Verify that all third-party integrations work correctly.
Once testing in staging is complete and successful:
-
Merge the staging branch into main:
git checkout main git merge staging git push origin main
-
Deploy the main branch to your production environment.
Always test thoroughly in staging before deploying to production.