Update .drone.yml
using DOCKER_HOST to deploy on private-pi
This commit is contained in:
26
.drone.yml
26
.drone.yml
@@ -8,12 +8,6 @@ platform:
|
|||||||
os: linux
|
os: linux
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
|
||||||
# Mount host Docker socket so steps can use Docker CLI
|
|
||||||
volumes:
|
|
||||||
- name: docker_sock
|
|
||||||
host:
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
|
|
||||||
workspace:
|
workspace:
|
||||||
path: /drone/src
|
path: /drone/src
|
||||||
|
|
||||||
@@ -21,9 +15,8 @@ steps:
|
|||||||
# Step 1: Check if image for the latest tag exists locally
|
# Step 1: Check if image for the latest tag exists locally
|
||||||
- name: check-version
|
- name: check-version
|
||||||
image: docker:24
|
image: docker:24
|
||||||
volumes:
|
environment:
|
||||||
- name: docker_sock
|
DOCKER_HOST: tcp://private-pi:2376
|
||||||
path: /var/run/docker.sock
|
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache git
|
- apk add --no-cache git
|
||||||
- git fetch --tags
|
- git fetch --tags
|
||||||
@@ -41,9 +34,8 @@ steps:
|
|||||||
# Step 2: Build Docker image (dynamic tag)
|
# Step 2: Build Docker image (dynamic tag)
|
||||||
- name: build-image
|
- name: build-image
|
||||||
image: docker:24
|
image: docker:24
|
||||||
volumes:
|
environment:
|
||||||
- name: docker_sock
|
DOCKER_HOST: tcp://private-pi:2376
|
||||||
path: /var/run/docker.sock
|
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
IMAGE_TAG=${DRONE_TAG:-latest}
|
IMAGE_TAG=${DRONE_TAG:-latest}
|
||||||
@@ -53,9 +45,8 @@ steps:
|
|||||||
# Step 3: Stop old container (if exists)
|
# Step 3: Stop old container (if exists)
|
||||||
- name: stop-old
|
- name: stop-old
|
||||||
image: docker:24
|
image: docker:24
|
||||||
volumes:
|
environment:
|
||||||
- name: docker_sock
|
DOCKER_HOST: tcp://private-pi:2376
|
||||||
path: /var/run/docker.sock
|
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
echo "🛑 Stopping old container..."
|
echo "🛑 Stopping old container..."
|
||||||
@@ -64,9 +55,8 @@ steps:
|
|||||||
# Step 4: Run container
|
# Step 4: Run container
|
||||||
- name: run-container
|
- name: run-container
|
||||||
image: docker:24
|
image: docker:24
|
||||||
volumes:
|
environment:
|
||||||
- name: docker_sock
|
DOCKER_HOST: tcp://private-pi:2376
|
||||||
path: /var/run/docker.sock
|
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
IMAGE_TAG=${DRONE_TAG:-latest}
|
IMAGE_TAG=${DRONE_TAG:-latest}
|
||||||
|
|||||||
Reference in New Issue
Block a user