Skip to content

Commit 820339e

Browse files
committed
Cambio en doc que explica que el deploy debe ser con app.ejemplo.cl y no con www.ejemplo.cl
1 parent d808c02 commit 820339e

3 files changed

Lines changed: 59 additions & 59 deletions

File tree

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ The main configuration is stored in `fabricator/sites.yml`, based on `sites-dist
8585

8686
Edit the sites.yml file located in the fabricator/ directory to configure your websites.
8787

88-
Each key represents a domain name (e.g., www.example.com). The value can be:
88+
Each key represents a domain name (e.g., app.example.com). The value can be:
8989

9090
- A dictionary with detailed configuration options.
9191

9292
Example:
9393

9494
```yaml
95-
www.example.com:
95+
app.example.com:
9696
repository: git@github.com:example/example.git
9797
branch: master
98-
deploy_path: /var/www/sites/www.example.com
98+
deploy_path: /var/www/sites/app.example.com
9999
venv: .venv
100100
runner: docker
101101
docker_container: my-container
@@ -112,7 +112,7 @@ www.example.com:
112112
For simple configurations you can use:
113113
114114
```shell
115-
./siteadd.py www.example.com git@github.com:example/example.git
115+
./siteadd.py app.example.com git@github.com:example/example.git
116116
```
117117
---
118118

@@ -153,7 +153,7 @@ fab2 list-sites
153153
Default runner is `local`, so this will deploy locally:
154154

155155
```bash
156-
fab2 deploy --site=www.example.com
156+
fab2 deploy --site=app.example.com
157157
```
158158

159159
---
@@ -163,13 +163,13 @@ fab2 deploy --site=www.example.com
163163
Specify the site which has `"runner: docker"` in `sites.yml`:
164164

165165
```bash
166-
fab2 deploy --site=www.example.com
166+
fab2 deploy --site=app.example.com
167167
```
168168

169169
You can also define the Docker container and user in the site config:
170170

171171
```yaml
172-
www.example.com:
172+
app.example.com:
173173
runner: docker
174174
docker_container: my-container
175175
docker_user: admin
@@ -182,7 +182,7 @@ www.example.com:
182182
When `"runner: ssh"` is configured in `sites.yml`, the deploy will be done over SSH:
183183

184184
```yaml
185-
www.example.com:
185+
app.example.com:
186186
runner: ssh
187187
host: 192.168.1.99
188188
user: deployer
@@ -191,13 +191,13 @@ www.example.com:
191191
You can override the SSH connection with environment variables:
192192

193193
```bash
194-
DEPLOYER_HOST=192.168.1.99 fab2 deploy --site=www.example.com
194+
DEPLOYER_HOST=192.168.1.99 fab2 deploy --site=app.example.com
195195
```
196196

197197
Or also set user and port:
198198

199199
```bash
200-
DEPLOYER_HOST=192.168.1.99 DEPLOYER_USER=admin DEPLOYER_PORT=22 fab2 deploy --site=www.example.com
200+
DEPLOYER_HOST=192.168.1.99 DEPLOYER_USER=admin DEPLOYER_PORT=22 fab2 deploy --site=app.example.com
201201
```
202202

203203
---
@@ -233,7 +233,7 @@ If a deployment fails during a critical step (like migrations), the system will
233233
You can manually revert to the last successful release at any time using:
234234

235235
```bash
236-
fab2 rollback --site=www.example.com
236+
fab2 rollback --site=app.example.com
237237
```
238238

239239
This will:
@@ -253,7 +253,7 @@ fab2 rollback-all
253253
If a deployment was interrupted and the `.deploy.lock` file wasn't removed:
254254

255255
```bash
256-
fab2 unlock --site=www.example.com
256+
fab2 unlock --site=app.example.com
257257
```
258258

259259
This forcibly removes the lock file and allows future deploys.

siteadd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def add_site(domain, repo_url):
6060
virtual environment folder. Prevents overwriting existing sites.
6161
6262
:param domain: Full domain name of the new site
63-
(e.g., ``www.example.com``).
63+
(e.g., ``app.example.com``).
6464
:type domain: str
6565
6666
:param repo_url: Git repository URL for the new site.
@@ -94,7 +94,7 @@ def add_site(domain, repo_url):
9494
# Ensure exactly two arguments are passed (domain and repo)
9595
LIMIT_ARGS = 2
9696
if len(sys.argv) != LIMIT_ARGS:
97-
print("Usage: ./siteadd.py \"www.example.com\" "
97+
print("Usage: ./siteadd.py \"app.example.com\" "
9898
"\"git@github.com:example/www.example.com.git\"")
9999
sys.exit(1)
100100

sites-dist.yml

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@
44

55
# Case 1: Simple local deploy
66
# Description: Executes a deploy in a local environment.
7-
# Command: fab2 deploy --site=www.localtest.cl
7+
# Command: fab2 deploy --site=app.localtest.cl
88
# Tested: Yes
9-
www.localtest.cl:
9+
app.localtest.cl:
1010
repository: git@github.com:ejemplo/localtest.git
11-
deploy_path: /var/www/sites/www.localtest.cl
11+
deploy_path: /var/www/sites/app.localtest.cl
1212
branch: main
1313
# runner: local (optional, defaults to local)
1414

1515
# Case 2: Local deploy with custom virtualenv
1616
# Description: Uses a custom directory name for the virtual environment.
17-
# Command: fab2 deploy --site=www.venvpersonalizado.cl
17+
# Command: fab2 deploy --site=app.venvpersonalizado.cl
1818
# Tested: Yes
19-
www.venvpersonalizado.cl:
19+
app.venvpersonalizado.cl:
2020
repository: git@github.com:ejemplo/venvtest.git
21-
deploy_path: /var/www/sites/www.venvpersonalizado.cl
21+
deploy_path: /var/www/sites/app.venvpersonalizado.cl
2222
venv: custom_env
2323
branch: main
2424

2525
# Case 3: Local deploy with shared files
2626
# Description: Uses shared files and directories for persistence.
27-
# Command: fab2 deploy --site=www.sharedlocal.cl
27+
# Command: fab2 deploy --site=app.sharedlocal.cl
2828
# Tested: Yes
29-
www.sharedlocal.cl:
29+
app.sharedlocal.cl:
3030
repository: git@github.com:ejemplo/shared.git
31-
deploy_path: /var/www/sites/www.sharedlocal.cl
31+
deploy_path: /var/www/sites/app.sharedlocal.cl
3232
branch: main
3333
shared_files:
3434
- .env
@@ -42,30 +42,30 @@ www.sharedlocal.cl:
4242

4343
# Case 4: Remote deploy using -H
4444
# Description: Deploy on remote server using -H flag.
45-
# Command: fab2 -H user@1.2.3.4 deploy --site=www.remoteserver.cl
45+
# Command: fab2 -H user@1.2.3.4 deploy --site=app.remoteserver.cl
4646
# Tested: No
47-
www.remoteserver.cl:
47+
app.remoteserver.cl:
4848
repository: git@github.com:ejemplo/remoteserver.git
49-
deploy_path: /var/www/sites/www.remoteserver.cl
49+
deploy_path: /var/www/sites/app.remoteserver.cl
5050
branch: main
5151

5252
# Case 5: Remote deploy with host defined in config
5353
# Description: Uses `host` field inside the config YAML.
54-
# Command: fab2 deploy --site=www.sshconfig.cl
54+
# Command: fab2 deploy --site=app.sshconfig.cl
5555
# Tested: No
56-
www.sshconfig.cl:
56+
app.sshconfig.cl:
5757
host: user@1.2.3.4
5858
repository: git@github.com:ejemplo/sshconfig.git
59-
deploy_path: /var/www/sites/www.sshconfig.cl
59+
deploy_path: /var/www/sites/app.sshconfig.cl
6060
branch: main
6161

6262
# Case 6: Remote with shared files and directories
6363
# Description: Uses shared_files and shared_dirs on a remote server.
64-
# Command: fab2 -H user@1.2.3.4 deploy --site=www.sharedremote.cl
64+
# Command: fab2 -H user@1.2.3.4 deploy --site=app.sharedremote.cl
6565
# Tested: No
66-
www.sharedremote.cl:
66+
app.sharedremote.cl:
6767
repository: git@github.com:ejemplo/sharedremote.git
68-
deploy_path: /var/www/sites/www.sharedremote.cl
68+
deploy_path: /var/www/sites/app.sharedremote.cl
6969
branch: main
7070
shared_files:
7171
- .env
@@ -79,23 +79,23 @@ www.sharedremote.cl:
7979

8080
# Case 7: Deploy inside Docker container
8181
# Description: Deploys the site inside a local Docker container.
82-
# Command: fab2 deploy --site=www.dockertest.cl
82+
# Command: fab2 deploy --site=app.dockertest.cl
8383
# Tested: Yes
84-
www.dockertest.cl:
84+
app.dockertest.cl:
8585
repository: git@github.com:ejemplo/docker.git
86-
deploy_path: /var/www/sites/www.dockertest.cl
86+
deploy_path: /var/www/sites/app.dockertest.cl
8787
branch: main
8888
runner: docker
8989
docker_container: derafu-sites-server-python-caddy
9090
docker_user: admin
9191

9292
# Case 8: Docker deploy with custom venv
9393
# Description: Uses a custom virtualenv path and enables Gunicorn logging.
94-
# Command: fab2 deploy --site=www.dockervenv.cl
94+
# Command: fab2 deploy --site=app.dockervenv.cl
9595
# Tested: Yes
96-
www.dockervenv.cl:
96+
app.dockervenv.cl:
9797
repository: git@github.com:ejemplo/dockervenv.git
98-
deploy_path: /var/www/sites/www.dockervenv.cl
98+
deploy_path: /var/www/sites/app.dockervenv.cl
9999
branch: main
100100
venv: .venv
101101
runner: docker
@@ -108,23 +108,23 @@ www.dockervenv.cl:
108108

109109
# Case 9: Docker deploy on remote server
110110
# Description: Executes the deploy inside a Docker container remotely.
111-
# Command: fab2 -H user@host deploy --site=www.remotedockertest.cl
111+
# Command: fab2 -H user@host deploy --site=app.remotedockertest.cl
112112
# Tested: No
113-
www.remotedockertest.cl:
113+
app.remotedockertest.cl:
114114
repository: git@github.com:ejemplo/docker.git
115-
deploy_path: /var/www/sites/www.remotedockertest.cl
115+
deploy_path: /var/www/sites/app.remotedockertest.cl
116116
branch: main
117117
runner: docker
118118
docker_container: derafu-sites-server-python-caddy
119119
docker_user: admin
120120

121121
# Case 10: Remote Docker with custom venv
122122
# Description: Docker deploy with custom venv path on a remote server.
123-
# Command: fab2 -H user@host deploy --site=www.remotedockervenv.cl
123+
# Command: fab2 -H user@host deploy --site=app.remotedockervenv.cl
124124
# Tested: No
125-
www.remotedockervenv.cl:
125+
app.remotedockervenv.cl:
126126
repository: git@github.com:ejemplo/dockervenv.git
127-
deploy_path: /var/www/sites/www.remotedockervenv.cl
127+
deploy_path: /var/www/sites/app.remotedockervenv.cl
128128
branch: main
129129
venv: .venv
130130
runner: docker
@@ -133,12 +133,12 @@ www.remotedockervenv.cl:
133133

134134
# Case 11: Remote Docker with host in config
135135
# Description: Runs Docker deploy remotely using host from the config file.
136-
# Command: fab2 deploy --site=www.remotedockerhost.cl
136+
# Command: fab2 deploy --site=app.remotedockerhost.cl
137137
# Tested: No
138-
www.remotedockerhost.cl:
138+
app.remotedockerhost.cl:
139139
host: user@remote.server.com
140140
repository: git@github.com:ejemplo/docker.git
141-
deploy_path: /var/www/sites/www.remotedockerhost.cl
141+
deploy_path: /var/www/sites/app.remotedockerhost.cl
142142
branch: main
143143
runner: docker
144144
docker_container: derafu-sites-server-python-caddy
@@ -151,11 +151,11 @@ www.remotedockerhost.cl:
151151
# Case 12: Docker with custom project subdirectory
152152
# Description: wsgi.py is located in a subfolder with a custom name (not domain).
153153
# The deploy script auto-detects the folder and uses it for Gunicorn.
154-
# Command: fab2 deploy --site=www.customproject.cl
154+
# Command: fab2 deploy --site=app.customproject.cl
155155
# Tested: Yes
156-
www.customproject.cl:
156+
app.customproject.cl:
157157
repository: git@github.com:ejemplo/customproject.git
158-
deploy_path: /var/www/sites/www.customproject.cl
158+
deploy_path: /var/www/sites/app.customproject.cl
159159
branch: main
160160
runner: docker
161161
docker_container: derafu-sites-server-python-caddy
@@ -167,11 +167,11 @@ www.customproject.cl:
167167

168168
# Case 13: Writable directories configuration
169169
# Description: Defines folders that must be writable after deploy.
170-
# Command: fab2 deploy --site=www.writeable.cl
170+
# Command: fab2 deploy --site=app.writeable.cl
171171
# Tested: Yes
172-
www.writeable.cl:
172+
app.writeable.cl:
173173
repository: git@github.com:ejemplo/writeable.git
174-
deploy_path: /var/www/sites/www.writeable.cl
174+
deploy_path: /var/www/sites/app.writeable.cl
175175
branch: main
176176
writable_dirs:
177177
- media
@@ -187,11 +187,11 @@ www.writeable.cl:
187187
# Case 16: Deploy with automatic backups
188188
# Description: Creates a compressed backup before each deploy and retains only a limited number of backup files.
189189
# This is useful for rollback or auditing purposes.
190-
# Command: fab2 deploy --site=www.examplebackup.cl
190+
# Command: fab2 deploy --site=app.examplebackup.cl
191191
# Status: Yes
192-
www.examplebackup.cl:
192+
app.examplebackup.cl:
193193
repository: git@github.com:example/example.git
194-
deploy_path: /var/www/sites/www.examplebackup.cl
194+
deploy_path: /var/www/sites/app.examplebackup.cl
195195
branch: main
196196
venv: .venv # Optional: custom virtual environment folder
197197
runner: docker # Optional: "local", "ssh", or "docker" (default is "local")
@@ -208,11 +208,11 @@ www.examplebackup.cl:
208208
# Description: Each deploy is stored in its own timestamped folder under releases/.
209209
# A symlink named 'current' is updated to point to the latest release.
210210
# Only a limited number of releases are kept to save disk space.
211-
# Command: fab2 deploy --site=www.examplereleases.cl
211+
# Command: fab2 deploy --site=app.examplereleases.cl
212212
# Status: Yes
213-
www.examplereleases.cl:
213+
app.examplereleases.cl:
214214
repository: git@github.com:example/example.git
215-
deploy_path: /var/www/sites/www.examplereleases.cl
215+
deploy_path: /var/www/sites/app.examplereleases.cl
216216
branch: main
217217
runner: local # Optional: "local", "ssh", or "docker" (default is "local")
218218
max_releases: 3 # Optional: number of releases to keep in releases/

0 commit comments

Comments
 (0)