Skip to content

Commit 2444a3f

Browse files
committed
Update README
1 parent c6662ca commit 2444a3f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ all:
8383
The playbook will automatically derive:
8484
- `ota_directory`: The directory where the code will be deployed (extracted from the repository URL, e.g., `demo-declarations`)
8585
- `ota_collection_id`: The collection identifier used for PM2 and nginx configuration (directory name without the `-declarations` suffix, e.g., `demo`)
86+
- `ota_pm2_home`: The PM2 home directory for isolating PM2 processes (e.g., `/home/debian/.pm2-demo`)
87+
88+
#### Multi-tenant deployment
89+
90+
Multiple collections can be deployed to the same server. Each collection will have its own isolated PM2 instance and nginx configuration. Simply define multiple hosts with different `ota_collection_repository` values, or deploy collections sequentially to the same host.
8691

8792
#### Changes on an existing deployment
8893

@@ -199,9 +204,9 @@ ansible-playbook ../playbooks/deploy.yml
199204
vagrant ssh # use "vagrant" as password
200205
```
201206

202-
- Check that everything works as intended within the virtual machine. Depending on the nature of changes made, you can monitor logs or execute commands to validate functionality:
207+
- Check that everything works as intended within the virtual machine. Depending on the nature of changes made, you can monitor logs or execute commands to validate functionality. Note that you need to set the `PM2_HOME` environment variable to the collection-specific PM2 home directory:
203208
```sh
204-
pm2 logs
209+
PM2_HOME=~/.pm2-demo pm2 logs
205210
```
206211

207212
#### Troubleshooting

0 commit comments

Comments
 (0)