Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Nov 21, 2024
1 parent 4f35552 commit 81403d5
Showing 1 changed file with 16 additions and 62 deletions.
78 changes: 16 additions & 62 deletions STAGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,76 +9,30 @@ This guide outlines the process of setting up a staging environment for the Drop

## Steps to Set Up Staging

1. Clone the repository on your staging server:
```
git clone https://github.com/CrzyHAX91/dropshipv2.git
cd dropshipv2
```

2. Create a new branch for staging:
```
git checkout -b staging
```

3. Set up environment variables for staging:
Create a .env file in the project root and add the following variables:
```
DEBUG=False
SECRET_KEY=your_staging_secret_key_here
DATABASE_URL=your_staging_database_url
ALLOWED_HOSTS=your-staging-domain.com
```

4. Install dependencies:
```
pip install -r requirements.txt
```

5. Run database migrations:
```
python manage.py migrate
```

6. Collect static files:
```
python manage.py collectstatic
```

7. Set up a process manager (e.g., Gunicorn) to run the application.

8. Configure your web server (e.g., Nginx) to serve the application.
1. Clone the repository on your staging server
2. Create a new branch for staging
3. Set up environment variables for staging
4. Install dependencies
5. Run database migrations
6. Collect static files
7. Set up a process manager (e.g., Gunicorn) to run the application
8. Configure your web server (e.g., Nginx) to serve the application

## Deploying to Staging

1. Push changes to the staging branch:
```
git push origin staging
```

2. On your staging server, pull the changes:
```
git pull origin staging
```

3. Restart your application server.
1. Push changes to the staging branch
2. On your staging server, pull the changes
3. Restart your application server

## Testing in Staging

- Perform thorough testing of all features in the staging environment.
- Test with a copy of production data (be sure to anonymize sensitive information).
- Verify that all third-party integrations work correctly in the staging environment.
- Perform thorough testing of all features in the staging environment
- Test with a copy of production data (be sure to anonymize sensitive information)
- Verify that all third-party integrations work correctly in the staging environment

## Promoting Staging to Production

Once testing in staging is complete and successful:

1. Merge the staging branch into main:
```
git checkout main
git merge staging
git push origin main
```

2. Deploy the main branch to your production environment.
1. Merge the staging branch into main
2. Deploy the main branch to your production environment

Remember to always test thoroughly in staging before deploying to production.

0 comments on commit 81403d5

Please sign in to comment.