deploy: follow the landing rename and the exorecovery.ru domains
Bring deploy/ in line with the renamed app directories and with the domains that are actually configured in the per-app .env files: fitnes fitness.exorecovery.ru 3000 fitness-landing hotel hotel.exorecovery.ru 3001 hotel-landing medcenterphysio physio.exorecovery.ru 3002 physio-landing medcenterstart start.exorecovery.ru 3003 start-landing apps.conf, the README provisioning steps (directories, bare clones, systemd units, the sudoers whitelist) and the exo-deploy usage line all used the old medcenter / medcenterpersonal keys. The README table and app.build.env.example still carried the *_DOMAIN placeholders. Also refresh the tracked .env.example files: real VITE_SITE_URL values instead of the old exodevices.ru sub-paths, and the amo lead tags that match apps.conf. Two lockfile fixes, both of which broke `npm ci` in exo-deploy: - medcenterstart had no lockfile at all after package-lock.json and pnpm-lock.yaml were removed — restore package-lock.json and keep the pnpm one deleted, since the deploy path is npm; - medcenterphysio/package-lock.json had lost "resolved" and "integrity" on 147 of its 236 entries — restore the complete file. Verified: exo-render-nginx renders all four vhosts with no leftover placeholders, and every package-lock.json agrees with its package.json. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
0732aa2096
commit
51f39c9b88
+11
-11
@@ -5,14 +5,14 @@ nginx serves the built SPA off disk; a small Express process per app handles onl
|
||||
`/api/*` and forwards leads to amoCRM. Releases are built on the server and swapped
|
||||
in atomically via a `current` symlink.
|
||||
|
||||
**Fill in `apps.conf` first** — it is the single source of truth for domains and ports.
|
||||
`apps.conf` is the single source of truth for domains and ports — check it before provisioning.
|
||||
|
||||
| App | Domain | Port | amoCRM tag |
|
||||
|---|---|---|---|
|
||||
| `fitnes` | `FITNES_DOMAIN` | 3000 | `fitness-landing` |
|
||||
| `hotel` | `HOTEL_DOMAIN` | 3001 | `hotel-landing` |
|
||||
| `medcenter` | `MEDCENTER_DOMAIN` | 3002 | `medcenter-landing` |
|
||||
| `medcenterpersonal` | `MCPERSONAL_DOMAIN` | 3003 | `medcenter-person-landing` |
|
||||
| `fitnes` | `fitness.exorecovery.ru` | 3000 | `fitness-landing` |
|
||||
| `hotel` | `hotel.exorecovery.ru` | 3001 | `hotel-landing` |
|
||||
| `medcenterphysio` | `physio.exorecovery.ru` | 3002 | `physio-landing` |
|
||||
| `medcenterstart` | `start.exorecovery.ru` | 3003 | `start-landing` |
|
||||
|
||||
## VPS requirements
|
||||
|
||||
@@ -73,13 +73,13 @@ apt install -y nodejs && node -v # v24.x
|
||||
|
||||
```bash
|
||||
adduser --system --group --home /srv/exo --shell /bin/bash exo
|
||||
mkdir -p /srv/exo/{fitnes,hotel,medcenter,medcenterpersonal}/releases
|
||||
mkdir -p /srv/exo/{fitnes,hotel,medcenterphysio,medcenterstart}/releases
|
||||
mkdir -p /etc/exo /var/www/certbot
|
||||
chown -R exo:exo /srv/exo
|
||||
chmod 755 /srv/exo # www-data must traverse to reach dist/client
|
||||
chmod 750 /etc/exo
|
||||
|
||||
for app in fitnes hotel medcenter medcenterpersonal; do
|
||||
for app in fitnes hotel medcenterphysio medcenterstart; do
|
||||
sudo -u exo git clone --bare <REPO_URL> /srv/exo/$app/repo
|
||||
done
|
||||
```
|
||||
@@ -109,7 +109,7 @@ systemd's `EnvironmentFile` (secrets) coexist and the secrets win.
|
||||
```bash
|
||||
install -m 644 systemd/exo@.service /etc/systemd/system/
|
||||
systemctl daemon-reload
|
||||
systemctl enable exo@fitnes exo@hotel exo@medcenter exo@medcenterpersonal
|
||||
systemctl enable exo@fitnes exo@hotel exo@medcenterphysio exo@medcenterstart
|
||||
```
|
||||
|
||||
Let the deploy user restart only its own units — `visudo -f /etc/sudoers.d/exo-deploy`:
|
||||
@@ -117,8 +117,8 @@ Let the deploy user restart only its own units — `visudo -f /etc/sudoers.d/exo
|
||||
```
|
||||
exo ALL=(root) NOPASSWD: /usr/bin/systemctl restart exo@fitnes, \
|
||||
/usr/bin/systemctl restart exo@hotel, \
|
||||
/usr/bin/systemctl restart exo@medcenter, \
|
||||
/usr/bin/systemctl restart exo@medcenterpersonal
|
||||
/usr/bin/systemctl restart exo@medcenterphysio, \
|
||||
/usr/bin/systemctl restart exo@medcenterstart
|
||||
```
|
||||
|
||||
### 6. Firewall and log retention
|
||||
@@ -180,7 +180,7 @@ Order matters: nginx needs the port-80 vhost live before certbot can validate.
|
||||
|
||||
```bash
|
||||
install -m 755 bin/exo-deploy /usr/local/bin/
|
||||
sudo -u exo exo-deploy medcenterpersonal main
|
||||
sudo -u exo exo-deploy medcenterphysio main
|
||||
```
|
||||
|
||||
## Runbook
|
||||
|
||||
Reference in New Issue
Block a user