Merge pull request 'fix: [nomad-prep] P10 — audit lib/ + compose for docker-backend-isms (#797)' (#812) from fix/issue-797 into main
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
This commit is contained in:
commit
98ec610645
2 changed files with 7 additions and 5 deletions
|
|
@ -31,8 +31,9 @@ _load_init_context() {
|
||||||
# Execute a command in the Forgejo container (for admin operations)
|
# Execute a command in the Forgejo container (for admin operations)
|
||||||
_forgejo_exec() {
|
_forgejo_exec() {
|
||||||
local use_bare="${DISINTO_BARE:-false}"
|
local use_bare="${DISINTO_BARE:-false}"
|
||||||
|
local cname="${FORGEJO_CONTAINER_NAME:-disinto-forgejo}"
|
||||||
if [ "$use_bare" = true ]; then
|
if [ "$use_bare" = true ]; then
|
||||||
docker exec -u git disinto-forgejo "$@"
|
docker exec -u git "$cname" "$@"
|
||||||
else
|
else
|
||||||
docker compose -f "${FACTORY_ROOT}/docker-compose.yml" exec -T -u git forgejo "$@"
|
docker compose -f "${FACTORY_ROOT}/docker-compose.yml" exec -T -u git forgejo "$@"
|
||||||
fi
|
fi
|
||||||
|
|
@ -94,11 +95,12 @@ setup_forge() {
|
||||||
# Bare-metal mode: standalone docker run
|
# Bare-metal mode: standalone docker run
|
||||||
mkdir -p "${FORGEJO_DATA_DIR}"
|
mkdir -p "${FORGEJO_DATA_DIR}"
|
||||||
|
|
||||||
if docker ps -a --format '{{.Names}}' | grep -q '^disinto-forgejo$'; then
|
local cname="${FORGEJO_CONTAINER_NAME:-disinto-forgejo}"
|
||||||
docker start disinto-forgejo >/dev/null 2>&1 || true
|
if docker ps -a --format '{{.Names}}' | grep -q "^${cname}$"; then
|
||||||
|
docker start "$cname" >/dev/null 2>&1 || true
|
||||||
else
|
else
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--name disinto-forgejo \
|
--name "$cname" \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
-p "${forge_port}:3000" \
|
-p "${forge_port}:3000" \
|
||||||
-p 2222:22 \
|
-p 2222:22 \
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ services:
|
||||||
WOODPECKER_AGENT_SECRET: ${WOODPECKER_AGENT_SECRET:-}
|
WOODPECKER_AGENT_SECRET: ${WOODPECKER_AGENT_SECRET:-}
|
||||||
WOODPECKER_GRPC_SECURE: "false"
|
WOODPECKER_GRPC_SECURE: "false"
|
||||||
WOODPECKER_HEALTHCHECK_ADDR: ":3333"
|
WOODPECKER_HEALTHCHECK_ADDR: ":3333"
|
||||||
WOODPECKER_BACKEND_DOCKER_NETWORK: disinto_disinto-net
|
WOODPECKER_BACKEND_DOCKER_NETWORK: ${WOODPECKER_CI_NETWORK:-disinto_disinto-net}
|
||||||
WOODPECKER_MAX_WORKFLOWS: 1
|
WOODPECKER_MAX_WORKFLOWS: 1
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3333/healthz"]
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3333/healthz"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue