ops: attach vault-dash to proxy-net and document vd1 route
This commit is contained in:
@@ -17,9 +17,22 @@ services:
|
|||||||
CORS_ORIGINS: ${CORS_ORIGINS:-*}
|
CORS_ORIGINS: ${CORS_ORIGINS:-*}
|
||||||
ports:
|
ports:
|
||||||
- "${APP_BIND_ADDRESS:-127.0.0.1}:${APP_PORT:-8000}:8000"
|
- "${APP_BIND_ADDRESS:-127.0.0.1}:${APP_PORT:-8000}:8000"
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- proxy-net
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8000/health"]
|
test:
|
||||||
|
[
|
||||||
|
"CMD",
|
||||||
|
"python",
|
||||||
|
"-c",
|
||||||
|
"import sys, urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3); sys.exit(0)",
|
||||||
|
]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
start_period: 20s
|
start_period: 20s
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy-net:
|
||||||
|
external: true
|
||||||
|
|||||||
@@ -78,11 +78,19 @@ env:
|
|||||||
4. **Configure Docker on the VPS**:
|
4. **Configure Docker on the VPS**:
|
||||||
- Ensure Docker and Docker Compose are installed
|
- Ensure Docker and Docker Compose are installed
|
||||||
- The deploy script will pull the container image from the registry
|
- The deploy script will pull the container image from the registry
|
||||||
|
- Ensure the shared external Docker network `proxy-net` exists so Caddy can reverse proxy the deployment by container name
|
||||||
|
|
||||||
5. **Verify network connectivity**:
|
5. **Publish VPN route through Caddy**:
|
||||||
|
- Add `http://vd1.uncloud.vpn` to `/opt/caddy/Caddyfile`
|
||||||
|
- Restrict access with the existing `@not-vpn` matcher for `10.100.0.0/24`
|
||||||
|
- Reverse proxy to `vault-dash:8000` on `proxy-net`
|
||||||
|
- Reload Caddy and verify `http://vd1.uncloud.vpn/health` over VPN
|
||||||
|
|
||||||
|
6. **Verify network connectivity**:
|
||||||
- Forgejo runner must be able to reach the VPS via SSH
|
- Forgejo runner must be able to reach the VPS via SSH
|
||||||
- VPS must be able to pull images from the registry
|
- VPS must be able to pull images from the registry
|
||||||
|
|
||||||
|
|
||||||
## Instructions for the DevOps Agent
|
## Instructions for the DevOps Agent
|
||||||
|
|
||||||
When setting up the deployment:
|
When setting up the deployment:
|
||||||
|
|||||||
Reference in New Issue
Block a user