deploy: Traefik hosts + registry images for shop/admin/api
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
Publish nginx/API images from CI and deploy on the Pi with shop.zea.lt, admin.zea.lt, and api.iled.zea.lt. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b494cde365
commit
6aefe2cb23
6 files changed
+165
-34
No files matched your search
+68
-5
@@ -1,5 +1,4 @@
|
||||
# Drone CI/CD for iLED shop
|
||||
# Builds run on the Windows desktop agent (linux/amd64). Pi only hosts Drone.
|
||||
# Drone CI/CD for iLED shop — build on desktop agent, deploy to Pi via SSH.
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
@@ -58,6 +57,60 @@ steps:
|
||||
depends_on:
|
||||
- api
|
||||
|
||||
- name: docker-api
|
||||
image: plugins/docker
|
||||
pull: false
|
||||
settings:
|
||||
repo: registry.zea.lt/miczek/iled-api
|
||||
registry: registry.zea.lt
|
||||
username:
|
||||
from_secret: registry_username
|
||||
password:
|
||||
from_secret: registry_password
|
||||
dockerfile: docker/Dockerfile.api
|
||||
context: .
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_COMMIT_SHA:0:7}
|
||||
depends_on:
|
||||
- api
|
||||
|
||||
- name: docker-shop
|
||||
image: plugins/docker
|
||||
pull: false
|
||||
settings:
|
||||
repo: registry.zea.lt/miczek/iled-shop
|
||||
registry: registry.zea.lt
|
||||
username:
|
||||
from_secret: registry_username
|
||||
password:
|
||||
from_secret: registry_password
|
||||
dockerfile: docker/Dockerfile.shop
|
||||
context: .
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_COMMIT_SHA:0:7}
|
||||
depends_on:
|
||||
- shop
|
||||
|
||||
- name: docker-admin
|
||||
image: plugins/docker
|
||||
pull: false
|
||||
settings:
|
||||
repo: registry.zea.lt/miczek/iled-admin
|
||||
registry: registry.zea.lt
|
||||
username:
|
||||
from_secret: registry_username
|
||||
password:
|
||||
from_secret: registry_password
|
||||
dockerfile: docker/Dockerfile.admin
|
||||
context: .
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_COMMIT_SHA:0:7}
|
||||
depends_on:
|
||||
- admin
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
@@ -101,18 +154,27 @@ steps:
|
||||
script_stop: true
|
||||
envs:
|
||||
- DEPLOY_PATH
|
||||
- REGISTRY_USERNAME
|
||||
- REGISTRY_PASSWORD
|
||||
script:
|
||||
- set -euo pipefail
|
||||
- DEPLOY_PATH="${DEPLOY_PATH:-/opt/iled-shop}"
|
||||
- cd "${DEPLOY_PATH}"
|
||||
- git fetch origin
|
||||
- git checkout "${DRONE_COMMIT_SHA}"
|
||||
- echo "${REGISTRY_PASSWORD}" | docker login registry.zea.lt -u "${REGISTRY_USERNAME}" --password-stdin
|
||||
- cd docker
|
||||
- docker compose --profile full pull || true
|
||||
- docker compose --profile full up -d --build --remove-orphans
|
||||
- docker compose --profile full ps
|
||||
- docker compose pull
|
||||
- docker compose up -d --remove-orphans
|
||||
- docker compose ps
|
||||
- docker logout registry.zea.lt || true
|
||||
environment:
|
||||
DEPLOY_PATH:
|
||||
from_secret: deploy_path
|
||||
REGISTRY_USERNAME:
|
||||
from_secret: registry_username
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: registry_password
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
@@ -120,3 +182,4 @@ trigger:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
- custom
|
||||
Reference in new issue
Block a user