Question
Answer and Explanation
Deployarr is a fantastic tool for streamlining deployments, but the exact method for deploying multiple domains simultaneously can vary depending on your specific setup and how you’ve configured Deployarr. Generally, it involves setting up configurations for each domain, and then Deployarr will manage the simultaneous deployments.
Here’s a breakdown of how you would typically achieve this:
1. Individual Domain Configuration:
- Before you deploy, you’ll need separate configuration for each domain you want to deploy. This typically includes:
- Repository Details: Specify where the code for each domain is hosted (e.g., Git repository URLs). These need to be distinct if they represent unique applications or websites.
- Deployment Scripts/Settings: Set up scripts, environment variables, and any custom settings needed for the particular domain to deploy to the server. The structure will often involve a `deploy.sh` type script
- Server/Destination Information: Point Deployarr to where the deployed files should be placed for each domain on its server. This includes specifying where root domains are set etc..
2. Creating Project Config:
- For Deployarr, you might achieve this by:
- Multiple Project Files: Create individual project files (.deploy.yaml) per domain that define their configuration.
- Within single project file: Create separate blocks of server definitions within single .deploy.yaml (for example, see below)
An example for having multiple domains can be shown like below:
deploy:
# Domain 1: example.com
- name: example.com
source:
type: "git"
repository: "git@github.com:username/domain1.git"
branch: "main"
target:
host: "192.168.1.100"
user: "user"
path: "/var/www/example.com/"
rsync_exclude: [".log"]
# Domain 2: example2.com
- name: example2.com
source:
type: "git"
repository: "git@github.com:username/domain2.git"
branch: "main"
target:
host: "192.168.1.100"
user: "user"
path: "/var/www/example2.com/"
rsync_exclude: [".log"]
3. Parallel Execution (If supported):
- Most tools will use command queue systems to complete deployments. So one deployment command sent will deploy multiple domains based on each configurations
4. Environment Configuration:
- Each site typically requires separate database access parameters, custom paths etc., You can maintain these differences for each website via use of environment variable. Use environmental variable where relevant such as access paths and parameters instead of using the plain path.
5. Deployment Execution:
- With all these configured, now deploy by triggering the respective configured deployment or project with Deployarr
Key Considerations
- Make sure Deployarr server has enough access and storage.
- If multiple servers or environments exist then those must be clearly defined in each config
The ability to deploy to multiple domains depends entirely on the capacity and logic within your server (e.g., if the ports, the application servers like Nginx and others are available). However Deployarr will let you control the deployment via the configuration files as shown.