fix(ci): use internal IP 10.10.0.10:3000 for registry everywhere
All checks were successful
CI/CD Pipeline / Code Quality Checks (push) Successful in 1m49s
CI/CD Pipeline / Run Tests (push) Successful in 2m5s
CI/CD Pipeline / Build Docker Images (push) Successful in 2s
CI/CD Pipeline / Push to Gitea Registry (push) Successful in 16s
CI/CD Pipeline / Deploy to Server (push) Successful in 1m11s
All checks were successful
CI/CD Pipeline / Code Quality Checks (push) Successful in 1m49s
CI/CD Pipeline / Run Tests (push) Successful in 2m5s
CI/CD Pipeline / Build Docker Images (push) Successful in 2s
CI/CD Pipeline / Push to Gitea Registry (push) Successful in 16s
CI/CD Pipeline / Deploy to Server (push) Successful in 1m11s
This commit is contained in:
@@ -129,14 +129,14 @@ jobs:
|
|||||||
|
|
||||||
BRANCH_TAG=$(echo ${GITHUB_REF_NAME} | sed 's/\//-/g')
|
BRANCH_TAG=$(echo ${GITHUB_REF_NAME} | sed 's/\//-/g')
|
||||||
SHA_SHORT=$(echo ${GITHUB_SHA} | cut -c1-7)
|
SHA_SHORT=$(echo ${GITHUB_SHA} | cut -c1-7)
|
||||||
REGISTRY_HOST="git.dev.nii-ecos.ru"
|
REGISTRY_HOST="10.10.0.10:3000"
|
||||||
REGISTRY="${REGISTRY_HOST}/${{ github.repository_owner }}"
|
REGISTRY="${REGISTRY_HOST}/${{ github.repository_owner }}"
|
||||||
|
|
||||||
# Debug
|
# Debug
|
||||||
echo "Registry: ${REGISTRY_HOST}"
|
echo "Registry: ${REGISTRY_HOST}"
|
||||||
echo "Actor: ${GITHUB_ACTOR}"
|
echo "Actor: ${GITHUB_ACTOR}"
|
||||||
|
|
||||||
# Login to Gitea container registry (requires REGISTRY_TOKEN secret with write:package scope)
|
# Login to Gitea container registry (HTTP, requires --insecure)
|
||||||
echo "${REGISTRY_PASSWORD}" | ./crane auth login --insecure ${REGISTRY_HOST} -u "${REGISTRY_USER}" --password-stdin
|
echo "${REGISTRY_PASSWORD}" | ./crane auth login --insecure ${REGISTRY_HOST} -u "${REGISTRY_USER}" --password-stdin
|
||||||
|
|
||||||
# Build and push web image
|
# Build and push web image
|
||||||
@@ -166,7 +166,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Image summary
|
- name: Image summary
|
||||||
run: |
|
run: |
|
||||||
echo "Images pushed to git.dev.nii-ecos.ru/${{ github.repository_owner }}/"
|
echo "Images pushed to 10.10.0.10:3000/${{ github.repository_owner }}/"
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy to Server
|
name: Deploy to Server
|
||||||
@@ -189,8 +189,8 @@ jobs:
|
|||||||
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_HOST} "
|
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_HOST} "
|
||||||
cd /opt/mostovik-backend
|
cd /opt/mostovik-backend
|
||||||
|
|
||||||
# Login to registry
|
# Login to registry (HTTP on internal IP)
|
||||||
echo '${REGISTRY_PASSWORD}' | docker login --username '${REGISTRY_USER}' --password-stdin git.dev.nii-ecos.ru
|
echo '${REGISTRY_PASSWORD}' | docker login --username '${REGISTRY_USER}' --password-stdin 10.10.0.10:3000
|
||||||
|
|
||||||
# Pull new images
|
# Pull new images
|
||||||
export IMAGE_TAG=${BRANCH_TAG}
|
export IMAGE_TAG=${BRANCH_TAG}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: git.dev.nii-ecos.ru/avm/mostovik-web:${IMAGE_TAG:-dev}
|
image: 10.10.0.10:3000/avm/mostovik-web:${IMAGE_TAG:-dev}
|
||||||
container_name: mostovik_web
|
container_name: mostovik_web
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -69,7 +69,7 @@ services:
|
|||||||
gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3"
|
gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3"
|
||||||
|
|
||||||
celery_worker:
|
celery_worker:
|
||||||
image: git.dev.nii-ecos.ru/avm/mostovik-celery:${IMAGE_TAG:-dev}
|
image: 10.10.0.10:3000/avm/mostovik-celery:${IMAGE_TAG:-dev}
|
||||||
container_name: mostovik_celery_worker
|
container_name: mostovik_celery_worker
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -94,7 +94,7 @@ services:
|
|||||||
command: celery -A config worker --loglevel=info
|
command: celery -A config worker --loglevel=info
|
||||||
|
|
||||||
celery_beat:
|
celery_beat:
|
||||||
image: git.dev.nii-ecos.ru/avm/mostovik-celery:${IMAGE_TAG:-dev}
|
image: 10.10.0.10:3000/avm/mostovik-celery:${IMAGE_TAG:-dev}
|
||||||
container_name: mostovik_celery_beat
|
container_name: mostovik_celery_beat
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
Reference in New Issue
Block a user