Use selfhosted registry
This commit is contained in:
parent
a5198dac97
commit
25340429ee
26
.drone.yml
26
.drone.yml
@ -26,11 +26,15 @@ steps:
|
|||||||
- name: build-image
|
- name: build-image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: c0ntroller/c0ntroller.de
|
|
||||||
username:
|
username:
|
||||||
from_secret: docker_user
|
from_secret: docker_user
|
||||||
password:
|
password:
|
||||||
from_secret: docker_token
|
from_secret: docker_token
|
||||||
|
registry:
|
||||||
|
from_secret: registry_host
|
||||||
|
repo:
|
||||||
|
from_secret: local_repo
|
||||||
|
insecure: true
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: ssh
|
type: ssh
|
||||||
@ -60,12 +64,14 @@ steps:
|
|||||||
from_secret: docker_user
|
from_secret: docker_user
|
||||||
DOCKER_PASS:
|
DOCKER_PASS:
|
||||||
from_secret: docker_token
|
from_secret: docker_token
|
||||||
IMAGE: c0ntroller/c0ntroller.de:dev
|
REGISTRY_HOST:
|
||||||
|
from_secret: registry_host
|
||||||
|
IMAGE: c0ntroller.de:dev
|
||||||
commands:
|
commands:
|
||||||
- docker login -u $${DOCKER_USER} -p $${DOCKER_PASS}
|
#- docker login -u $${DOCKER_USER} -p $${DOCKER_PASS}
|
||||||
- docker-compose -p website-dev -f docker-compose.dev.yml rm -s -v -f
|
- docker-compose -p website-dev -f docker-compose.dev.yml rm -s -v -f
|
||||||
- docker rmi $${IMAGE} || true
|
- docker rmi $${REGISTRY_HOST}/$${IMAGE} || true
|
||||||
- docker pull $${IMAGE}
|
- docker pull $${REGISTRY_HOST}/$${IMAGE}
|
||||||
- docker-compose -p website-dev -f docker-compose.dev.yml up --no-build -d
|
- docker-compose -p website-dev -f docker-compose.dev.yml up --no-build -d
|
||||||
- name: deploy-stable
|
- name: deploy-stable
|
||||||
when:
|
when:
|
||||||
@ -76,10 +82,12 @@ steps:
|
|||||||
from_secret: docker_user
|
from_secret: docker_user
|
||||||
DOCKER_PASS:
|
DOCKER_PASS:
|
||||||
from_secret: docker_token
|
from_secret: docker_token
|
||||||
IMAGE: c0ntroller/c0ntroller.de:latest
|
REGISTRY_HOST:
|
||||||
|
from_secret: registry_host
|
||||||
|
IMAGE: c0ntroller.de:latest
|
||||||
commands:
|
commands:
|
||||||
- docker login -u $${DOCKER_USER} -p $${DOCKER_PASS}
|
#- docker login -u $${DOCKER_USER} -p $${DOCKER_PASS}
|
||||||
- docker-compose -p website -f docker-compose.stable.yml rm -s -v -f
|
- docker-compose -p website -f docker-compose.stable.yml rm -s -v -f
|
||||||
- docker rmi $${IMAGE} || true
|
- docker rmi $${REGISTRY_HOST}/$${IMAGE} || true
|
||||||
- docker pull $${IMAGE}
|
- docker pull $${REGISTRY_HOST}/$${IMAGE}
|
||||||
- docker-compose -p website -f docker-compose.stable.yml up --no-build -d
|
- docker-compose -p website -f docker-compose.stable.yml up --no-build -d
|
@ -2,7 +2,7 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: c0ntroller/c0ntroller.de:dev
|
image: localhost:5000/c0ntroller.de:dev
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
|
@ -2,7 +2,7 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: c0ntroller/c0ntroller.de:latest
|
image: localhost:5000/c0ntroller.de:latest
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
|
Loading…
Reference in New Issue
Block a user