Update production registry pull over VPN
Build & Deploy / Build & Push Docker Image (push) Successful in 2m53s
Test / Type Check (all packages) (push) Successful in 54s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 46s
Test / Homepage Unit Tests (push) Successful in 43s
Test / Storefront Unit Tests (push) Successful in 40s
Test / Admin Unit Tests (push) Successful in 41s
Test / Dashboard Unit Tests (push) Successful in 42s
Test / API Integration Tests (push) Successful in 58s
Build & Deploy / Build & Push Docker Image (push) Successful in 2m53s
Test / Type Check (all packages) (push) Successful in 54s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 46s
Test / Homepage Unit Tests (push) Successful in 43s
Test / Storefront Unit Tests (push) Successful in 40s
Test / Admin Unit Tests (push) Successful in 41s
Test / Dashboard Unit Tests (push) Successful in 42s
Test / API Integration Tests (push) Successful in 58s
Configure production defaults to pull images directly from the VPN registry at 10.0.0.4, with the VPS reachable at 10.0.0.1, and disable archive handoff by default.
This commit is contained in:
@@ -16,11 +16,11 @@ REGISTRY_HOST=10.0.0.4
|
|||||||
REGISTRY_USER=melabidi
|
REGISTRY_USER=melabidi
|
||||||
REGISTRY_PASSWORD=
|
REGISTRY_PASSWORD=
|
||||||
|
|
||||||
# Optional shared folder for image archives created by the VPN/registry helper container.
|
# Optional shared folder for image archives. Leave empty when the VPS can pull from the VPN registry directly.
|
||||||
# The VPS cannot reach the VPN-only registry, so archive loading is required.
|
# Current production VPN routing: VPS 10.0.0.1 can reach registry 10.0.0.4.
|
||||||
IMAGE_ARCHIVE_DIR=/opt/docker-image-transfer
|
IMAGE_ARCHIVE_DIR=
|
||||||
IMAGE_ARCHIVE_REQUIRED=true
|
IMAGE_ARCHIVE_REQUIRED=false
|
||||||
# Optional VPN container name/id used by deploy-production.sh to fetch a missing image archive.
|
# Optional VPN container name/id used only for archive handoff deployments.
|
||||||
# VPN_CONTAINER=
|
# VPN_CONTAINER=
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
|
|||||||
@@ -42,16 +42,21 @@ If Docker needs to log in before pulling the app image, also set:
|
|||||||
- `REGISTRY_USER`
|
- `REGISTRY_USER`
|
||||||
- `REGISTRY_PASSWORD`
|
- `REGISTRY_PASSWORD`
|
||||||
|
|
||||||
For the current VPN-reachable image registry, use:
|
For the current VPN-reachable image registry, use direct pulls from the VPS.
|
||||||
|
The registry is `10.0.0.4`, and the VPS WireGuard address is `10.0.0.1`.
|
||||||
|
|
||||||
```env
|
```env
|
||||||
APP_IMAGE=10.0.0.4/melabidi/carmanagement
|
APP_IMAGE=10.0.0.4/melabidi/carmanagement
|
||||||
REGISTRY_HOST=10.0.0.4
|
REGISTRY_HOST=10.0.0.4
|
||||||
|
REGISTRY_USER=melabidi
|
||||||
|
IMAGE_ARCHIVE_DIR=
|
||||||
|
IMAGE_ARCHIVE_REQUIRED=false
|
||||||
```
|
```
|
||||||
|
|
||||||
## VPN Container Image Handoff
|
## VPN Container Image Handoff
|
||||||
|
|
||||||
If the registry is only reachable inside a VPN container, use the shared archive folder:
|
This fallback is only needed if the VPS cannot reach `10.0.0.4` directly. If the
|
||||||
|
registry is only reachable inside a VPN container, use the shared archive folder:
|
||||||
|
|
||||||
```env
|
```env
|
||||||
IMAGE_ARCHIVE_DIR=/opt/docker-image-transfer
|
IMAGE_ARCHIVE_DIR=/opt/docker-image-transfer
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ set -euo pipefail
|
|||||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
source "${ROOT_DIR}/scripts/docker-prod-common.sh"
|
source "${ROOT_DIR}/scripts/docker-prod-common.sh"
|
||||||
|
|
||||||
APP_IMAGE="${APP_IMAGE:-registry.rentaldrivego.ma/rentaldrivego/car_management_system}"
|
APP_IMAGE="${APP_IMAGE:-10.0.0.4/melabidi/carmanagement}"
|
||||||
APP_VERSION="${APP_VERSION:-${1:-}}"
|
APP_VERSION="${APP_VERSION:-${1:-}}"
|
||||||
REGISTRY_USER="${REGISTRY_USER:-rentaldrivego_registry}"
|
REGISTRY_USER="${REGISTRY_USER:-melabidi}"
|
||||||
INCLUDE_PGMANAGE="${INCLUDE_PGMANAGE:-0}"
|
INCLUDE_PGMANAGE="${INCLUDE_PGMANAGE:-0}"
|
||||||
POSTGRES_CONTAINER="${PROJECT_NAME}-postgres-1"
|
POSTGRES_CONTAINER="${PROJECT_NAME}-postgres-1"
|
||||||
REDIS_CONTAINER="${PROJECT_NAME}-redis-1"
|
REDIS_CONTAINER="${PROJECT_NAME}-redis-1"
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ pull_prod_release_images() {
|
|||||||
|
|
||||||
if [[ "${IMAGE_ARCHIVE_REQUIRED:-false}" == "true" || "${IMAGE_ARCHIVE_REQUIRED:-0}" == "1" ]]; then
|
if [[ "${IMAGE_ARCHIVE_REQUIRED:-false}" == "true" || "${IMAGE_ARCHIVE_REQUIRED:-0}" == "1" ]]; then
|
||||||
echo "IMAGE_ARCHIVE_REQUIRED is enabled, but no archive for IMAGE_TAG=${IMAGE_TAG} was found in ${IMAGE_ARCHIVE_DIR:-<unset>}." >&2
|
echo "IMAGE_ARCHIVE_REQUIRED is enabled, but no archive for IMAGE_TAG=${IMAGE_TAG} was found in ${IMAGE_ARCHIVE_DIR:-<unset>}." >&2
|
||||||
echo "The VPS cannot reach the VPN-only registry. Create a shared archive first, for example:" >&2
|
echo "Direct docker pull is disabled in this mode. Create a shared archive first, for example:" >&2
|
||||||
echo " docker save ${APP_IMAGE:-rentaldrivego/carmanagement}:${IMAGE_TAG} -o ${IMAGE_ARCHIVE_DIR:-./image-archives}/carmanagement-${IMAGE_TAG}.tar" >&2
|
echo " docker save ${APP_IMAGE:-rentaldrivego/carmanagement}:${IMAGE_TAG} -o ${IMAGE_ARCHIVE_DIR:-./image-archives}/carmanagement-${IMAGE_TAG}.tar" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ set -euo pipefail
|
|||||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
source "${ROOT_DIR}/scripts/docker-prod-common.sh"
|
source "${ROOT_DIR}/scripts/docker-prod-common.sh"
|
||||||
|
|
||||||
APP_IMAGE="${APP_IMAGE:-registry.rentaldrivego.ma/rentaldrivego/car_management_system}"
|
APP_IMAGE="${APP_IMAGE:-10.0.0.4/melabidi/carmanagement}"
|
||||||
APP_VERSION="${APP_VERSION:-${1:-}}"
|
APP_VERSION="${APP_VERSION:-${1:-}}"
|
||||||
REGISTRY_USER="${REGISTRY_USER:-rentaldrivego_registry}"
|
REGISTRY_USER="${REGISTRY_USER:-melabidi}"
|
||||||
INCLUDE_PGMANAGE="${INCLUDE_PGMANAGE:-0}"
|
INCLUDE_PGMANAGE="${INCLUDE_PGMANAGE:-0}"
|
||||||
POSTGRES_CONTAINER="${PROJECT_NAME}-postgres-1"
|
POSTGRES_CONTAINER="${PROJECT_NAME}-postgres-1"
|
||||||
REDIS_CONTAINER="${PROJECT_NAME}-redis-1"
|
REDIS_CONTAINER="${PROJECT_NAME}-redis-1"
|
||||||
|
|||||||
Reference in New Issue
Block a user