Implement deploy strategy for local development; refactor container to use startup script.

This commit is contained in:
Ben Binder
2025-03-07 21:10:03 -06:00
parent 74b91aa4fb
commit abb00b7688
8 changed files with 83 additions and 35 deletions

View File

@@ -7,8 +7,11 @@ steps:
password:
from_secret: REGISTRY_PASSWORD
registry: registry.binderlab.io
repo: registry.binderlab.io/harbormaster
repo: registry.binderlab.io/harbormaster-server
tags: latest
file: docker/Dockerfile
context: .
push: true
when:
event: manual
@@ -19,19 +22,22 @@ steps:
from_secret: REGISTRY_USERNAME
REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD
RESET_DB:
from_secret: RESET_DB
settings:
host: binderlab.io
username: binderb
envs:
- REGISTRY_USERNAME
- REGISTRY_PASSWORD
- RESET_DB
key:
from_secret: SSH_PRIVATE_KEY
script:
- echo "$REGISTRY_PASSWORD" | docker login registry.binderlab.io --username "$REGISTRY_USERNAME" --password-stdin
- docker pull registry.binderlab.io/harbormaster:latest
- docker pull registry.binderlab.io/harbormaster-server:latest
- docker stop harbormaster || true
- docker rm harbormaster || true
- docker run -d --name harbormaster -p 7080:8080 registry.binderlab.io/harbormaster:latest
- docker run -d --name harbormaster -p 7080:8080 -e RESET_DB $RESET_DB registry.binderlab.io/harbormaster:latest
when:
event: manual