Update for multi-domain deployment alongside existing apps
This commit is contained in:
1 parent
b51b5e8d29
commit
5814f76b28
2 files changed
+30
-23
No files matched your search
@@ -116,39 +116,43 @@ Users can choose their preferred login method on the login page.
|
||||
|
||||
## Production Deployment
|
||||
|
||||
For production deployment on Ubuntu with reverse proxy:
|
||||
For production deployment on Ubuntu with reverse proxy (multi-domain setup):
|
||||
|
||||
1. **Run the automated installation script**:
|
||||
```bash
|
||||
# On your Ubuntu server
|
||||
# On your Ubuntu server (can coexist with other apps)
|
||||
wget https://gitlab.com/trbc-dev/pdf-rename-sort/-/raw/main/ubuntu-install.sh
|
||||
chmod +x ubuntu-install.sh
|
||||
sudo ./ubuntu-install.sh
|
||||
```
|
||||
|
||||
2. **Configure environment variables**:
|
||||
2. **Configure DNS**:
|
||||
- Point a subdomain (e.g., `pdf-renamer.yourdomain.com`) to your server's IP
|
||||
- This allows the app to run alongside your existing app on port 5000
|
||||
|
||||
3. **Configure environment variables**:
|
||||
Edit `/etc/systemd/system/pdf-renamer.service` and update:
|
||||
- `SECRET_KEY`: Generate a secure random key
|
||||
- `TENANT_ID`, `CLIENT_ID`, `CLIENT_SECRET`: From Azure AD app registration
|
||||
- `ADMIN_USERNAME` and `ADMIN_PASSWORD`: Set secure credentials
|
||||
|
||||
3. **Update domain configuration**:
|
||||
Edit `/etc/nginx/sites-available/pdf-renamer` and replace `your-domain.com` with your actual domain
|
||||
4. **Update domain configuration**:
|
||||
Edit `/etc/nginx/sites-available/pdf-renamer` and replace `pdf-renamer.your-domain.com` with your actual subdomain
|
||||
|
||||
4. **Enable SSL (recommended)**:
|
||||
5. **Enable SSL (recommended)**:
|
||||
```bash
|
||||
sudo apt install certbot python3-certbot-nginx
|
||||
sudo certbot --nginx -d your-domain.com
|
||||
sudo certbot --nginx -d your-subdomain.yourdomain.com
|
||||
```
|
||||
|
||||
5. **Reload services**:
|
||||
6. **Reload services**:
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart pdf-renamer
|
||||
sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
The application will be accessible at your domain on ports 80 (HTTP) and 443 (HTTPS after SSL setup).
|
||||
The application will be accessible at your subdomain on ports 80 (HTTP) and 443 (HTTPS after SSL setup), running alongside your existing application.
|
||||
|
||||
## Development
|
||||
|
||||
|
||||
Reference in new issue
Block a user