docker compose not docker-compose

This commit is contained in:
Jamie Curnow committed 2026-09-28 11:37:31 +10:00
1 parent 796920ed13
commit 853ef909a7
9 files changed
+83 -117

No files matched your search

Vendored
+23 -23
View File
@@ -122,19 +122,19 @@ pipeline {
sh 'rm -rf ./test/results/junit/*'
sh './scripts/ci/fulltest-cypress'
// Adding this here as the schema needs to come from a running stack, but this will be used by docs later
sh 'docker-compose exec -T fullstack curl -s --output /temp-docs/api-schema.json "http://fullstack:81/api/schema"'
sh 'docker compose exec -T fullstack curl -s --output /temp-docs/api-schema.json "http://fullstack:81/api/schema"'
}
post {
always {
// Dumps to analyze later
sh 'mkdir -p debug/sqlite'
sh 'docker logs $(docker-compose ps --all -q fullstack) > debug/sqlite/docker_fullstack.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q stepca) > debug/sqlite/docker_stepca.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q pdns) > debug/sqlite/docker_pdns.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q pdns-db) > debug/sqlite/docker_pdns-db.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q dnsrouter) > debug/sqlite/docker_dnsrouter.log 2>&1'
sh 'docker logs $(docker compose ps --all -q fullstack) > debug/sqlite/docker_fullstack.log 2>&1'
sh 'docker logs $(docker compose ps --all -q stepca) > debug/sqlite/docker_stepca.log 2>&1'
sh 'docker logs $(docker compose ps --all -q pdns) > debug/sqlite/docker_pdns.log 2>&1'
sh 'docker logs $(docker compose ps --all -q pdns-db) > debug/sqlite/docker_pdns-db.log 2>&1'
sh 'docker logs $(docker compose ps --all -q dnsrouter) > debug/sqlite/docker_dnsrouter.log 2>&1'
junit 'test/results/junit/*'
sh 'docker-compose down --remove-orphans --volumes -t 30 || true'
sh 'docker compose down --remove-orphans --volumes -t 30 || true'
}
}
}
@@ -156,13 +156,13 @@ pipeline {
always {
// Dumps to analyze later
sh 'mkdir -p debug/mysql'
sh 'docker logs $(docker-compose ps --all -q fullstack) > debug/mysql/docker_fullstack.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q stepca) > debug/mysql/docker_stepca.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q pdns) > debug/mysql/docker_pdns.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q pdns-db) > debug/mysql/docker_pdns-db.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q dnsrouter) > debug/mysql/docker_dnsrouter.log 2>&1'
sh 'docker logs $(docker compose ps --all -q fullstack) > debug/mysql/docker_fullstack.log 2>&1'
sh 'docker logs $(docker compose ps --all -q stepca) > debug/mysql/docker_stepca.log 2>&1'
sh 'docker logs $(docker compose ps --all -q pdns) > debug/mysql/docker_pdns.log 2>&1'
sh 'docker logs $(docker compose ps --all -q pdns-db) > debug/mysql/docker_pdns-db.log 2>&1'
sh 'docker logs $(docker compose ps --all -q dnsrouter) > debug/mysql/docker_dnsrouter.log 2>&1'
junit 'test/results/junit/*'
sh 'docker-compose down --remove-orphans --volumes -t 30 || true'
sh 'docker compose down --remove-orphans --volumes -t 30 || true'
}
}
}
@@ -184,18 +184,18 @@ pipeline {
always {
// Dumps to analyze later
sh 'mkdir -p debug/postgres'
sh 'docker logs $(docker-compose ps --all -q fullstack) > debug/postgres/docker_fullstack.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q stepca) > debug/postgres/docker_stepca.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q pdns) > debug/postgres/docker_pdns.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q pdns-db) > debug/postgres/docker_pdns-db.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q dnsrouter) > debug/postgres/docker_dnsrouter.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q db-postgres) > debug/postgres/docker_db.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q authentik) > debug/postgres/docker_authentik.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q authentik-redis) > debug/postgres/docker_authentik-redis.log 2>&1'
sh 'docker logs $(docker-compose ps --all -q authentik-ldap) > debug/postgres/docker_authentik-ldap.log 2>&1'
sh 'docker logs $(docker compose ps --all -q fullstack) > debug/postgres/docker_fullstack.log 2>&1'
sh 'docker logs $(docker compose ps --all -q stepca) > debug/postgres/docker_stepca.log 2>&1'
sh 'docker logs $(docker compose ps --all -q pdns) > debug/postgres/docker_pdns.log 2>&1'
sh 'docker logs $(docker compose ps --all -q pdns-db) > debug/postgres/docker_pdns-db.log 2>&1'
sh 'docker logs $(docker compose ps --all -q dnsrouter) > debug/postgres/docker_dnsrouter.log 2>&1'
sh 'docker logs $(docker compose ps --all -q db-postgres) > debug/postgres/docker_db.log 2>&1'
sh 'docker logs $(docker compose ps --all -q authentik) > debug/postgres/docker_authentik.log 2>&1'
sh 'docker logs $(docker compose ps --all -q authentik-redis) > debug/postgres/docker_authentik-redis.log 2>&1'
sh 'docker logs $(docker compose ps --all -q authentik-ldap) > debug/postgres/docker_authentik-ldap.log 2>&1'
junit 'test/results/junit/*'
sh 'docker-compose down --remove-orphans --volumes -t 30 || true'
sh 'docker compose down --remove-orphans --volumes -t 30 || true'
}
}
}
-3
View File
@@ -73,9 +73,6 @@ services:
3. Bring up your stack by running
```bash
docker-compose up -d
# If using docker-compose-plugin
docker compose up -d
```
+4 -9
View File
@@ -3,12 +3,7 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
# Ensure docker-compose exists
# Make sure docker exists
if hash docker-compose 2>/dev/null; then
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Destroying Dev Stack ...${RESET}"
docker-compose down --remove-orphans --volumes
else
echo -e "${RED}❯ docker-compose command is not available${RESET}"
fi
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Destroying Dev Stack ...${RESET}"
docker compose down --remove-orphans --volumes
+5 -9
View File
@@ -3,12 +3,8 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
# Ensure docker-compose exists
if hash docker 2>/dev/null; then
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Building Docs ...${RESET}"
docker run --rm -e CI=true -v "$(pwd)/docs:/app/docs" -w /app/docs node:latest sh -c "yarn install && yarn build && chown -R $(id -u):$(id -g) /app/docs"
echo -e "${BLUE}❯ ${GREEN}Building Docs Complete${RESET}"
else
echo -e "${RED}❯ docker command is not available${RESET}"
fi
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Building Docs ...${RESET}"
docker run --rm -e CI=true -v "$(pwd)/docs:/app/docs" -w /app/docs node:latest sh -c "yarn install && yarn build && chown -R $(id -u):$(id -g) /app/docs"
echo -e "${BLUE}❯ ${GREEN}Building Docs Complete${RESET}"
+7 -12
View File
@@ -3,15 +3,10 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
# Ensure docker-compose exists
if hash docker 2>/dev/null; then
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Linting Frontend ...${RESET}"
docker run --rm -e CI=true -v "$(pwd)/frontend:/app/frontend" -w /app/frontend node:lts sh -c "yarn install && yarn eslint src;chown -R $(id -u):$(id -g) /app/frontend"
RES=$?
echo -e "${BLUE}❯ ${GREEN}Linting Frontend Complete${RESET}"
exit $RES
else
echo -e "${RED}❯ docker command is not available${RESET}"
exit 1
fi
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Linting Frontend ...${RESET}"
docker run --rm -e CI=true -v "$(pwd)/frontend:/app/frontend" -w /app/frontend node:lts sh -c "yarn install && yarn eslint src;chown -R $(id -u):$(id -g) /app/frontend"
RES=$?
echo -e "${BLUE}❯ ${GREEN}Linting Frontend Complete${RESET}"
exit $RES
+6 -10
View File
@@ -3,15 +3,11 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
# Ensure docker-compose exists
if hash docker-compose 2>/dev/null; then
cd "${DIR}/.."
cd "${DIR}/.."
echo ""
inform "Tip: List tables with: \\dt"
echo ""
echo ""
inform "Tip: List tables with: \\dt"
echo ""
docker compose exec npm usql /data/nginxproxymanager.db
docker-compose exec npm usql /data/nginxproxymanager.db
else
echo -e "${RED}❯ docker-compose command is not available${RESET}"
fi
+30 -34
View File
@@ -8,49 +8,45 @@ get_container_ip () {
local container_name=$1
local container
local ip
container=$(docker-compose ps --all -q "${container_name}" | tail -n1)
container=$(docker compose ps --all -q "${container_name}" | tail -n1)
ip=$(docker inspect -f "{{.NetworkSettings.Networks.npmdev_default.IPAddress}}" "$container")
echo "$ip"
}
# Ensure docker-compose exists
if hash docker-compose 2>/dev/null; then
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Starting Dev Stack ...${RESET}"
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Starting Dev Stack ...${RESET}"
# Bring up a stack, in steps so we can inject IPs everywhere
docker-compose up -d npm-pdns npm-pdns-db
PDNS_IP=$(get_container_ip 'npm-pdns')
echo -e "${BLUE}❯ ${YELLOW}PDNS IP is ${PDNS_IP}${RESET}"
# Bring up a stack, in steps so we can inject IPs everywhere
docker compose up -d npm-pdns npm-pdns-db
PDNS_IP=$(get_container_ip 'npm-pdns')
echo -e "${BLUE}❯ ${YELLOW}PDNS IP is ${PDNS_IP}${RESET}"
# adjust the dnsrouter config
LOCAL_DNSROUTER_CONFIG="$DIR/../docker/dev/dnsrouter-config.json"
rm -rf "$LOCAL_DNSROUTER_CONFIG.tmp"
# IMPORTANT: changes to dnsrouter-config.json will affect this line:
jq --arg a "$PDNS_IP" '.servers[0].upstreams[1].upstream = $a' "$LOCAL_DNSROUTER_CONFIG" > "$LOCAL_DNSROUTER_CONFIG.tmp"
# adjust the dnsrouter config
LOCAL_DNSROUTER_CONFIG="$DIR/../docker/dev/dnsrouter-config.json"
rm -rf "$LOCAL_DNSROUTER_CONFIG.tmp"
# IMPORTANT: changes to dnsrouter-config.json will affect this line:
jq --arg a "$PDNS_IP" '.servers[0].upstreams[1].upstream = $a' "$LOCAL_DNSROUTER_CONFIG" > "$LOCAL_DNSROUTER_CONFIG.tmp"
# dnsrouter
docker-compose up -d npm-dnsrouter
DNSROUTER_IP=$(get_container_ip 'npm-dnsrouter')
echo -e "${BLUE}❯ ${YELLOW}DNS Router IP is ${DNSROUTER_IP}${RESET}"
# dnsrouter
docker compose up -d npm-dnsrouter
DNSROUTER_IP=$(get_container_ip 'npm-dnsrouter')
echo -e "${BLUE}❯ ${YELLOW}DNS Router IP is ${DNSROUTER_IP}${RESET}"
# mount the resolver
LOCAL_RESOLVE="$DIR/../docker/dev/resolv.conf"
rm -rf "${LOCAL_RESOLVE}"
printf "nameserver %s\noptions ndots:0" "${DNSROUTER_IP}" > "${LOCAL_RESOLVE}"
# mount the resolver
LOCAL_RESOLVE="$DIR/../docker/dev/resolv.conf"
rm -rf "${LOCAL_RESOLVE}"
printf "nameserver %s\noptions ndots:0" "${DNSROUTER_IP}" > "${LOCAL_RESOLVE}"
# bring things up, but only what we haven't already created
docker-compose up -d --remove-orphans --force-recreate --build npm npm-pebble npm-stepca npm-swagger
# bring things up, but only what we haven't already created
docker compose up -d --remove-orphans --force-recreate --build npm npm-pebble npm-stepca npm-swagger
if [ "$1" == "-f" ]; then
echo -e "${BLUE}❯ ${YELLOW}Following Backend Container:${RESET}"
docker logs -f npm.dev
else
echo -e "${YELLOW}Tip:${RESET} You can follow the output of some of the containers with:"
echo " docker logs -f npm.dev"
echo -e "${YELLOW}Tip:${RESET} Open a database terminal with:"
echo " ./scripts/sqlite"
fi
if [ "$1" == "-f" ]; then
echo -e "${BLUE}❯ ${YELLOW}Following Backend Container:${RESET}"
docker logs -f npm.dev
else
echo -e "${RED}❯ docker-compose command is not available${RESET}"
echo -e "${YELLOW}Tip:${RESET} You can follow the output of some of the containers with:"
echo " docker logs -f npm.dev"
echo -e "${YELLOW}Tip:${RESET} Open a database terminal with:"
echo " ./scripts/sqlite"
fi
+4 -9
View File
@@ -3,12 +3,7 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
# Ensure docker-compose exists
# Make sure docker exists
if hash docker-compose 2>/dev/null; then
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Stopping Dev Stack ...${RESET}"
docker-compose down --remove-orphans
else
echo -e "${RED}❯ docker-compose command is not available${RESET}"
fi
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Stopping Dev Stack ...${RESET}"
docker compose down --remove-orphans
+4 -8
View File
@@ -3,11 +3,7 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
# Ensure docker-compose exists
if hash docker-compose 2>/dev/null; then
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Testing Dev Stack ...${RESET}"
docker-compose exec -T npm bash -c "cd /app/backend && task test"
else
echo -e "${RED}❯ docker-compose command is not available${RESET}"
fi
cd "${DIR}/.."
echo -e "${BLUE}❯ ${CYAN}Testing Dev Stack ...${RESET}"
docker compose exec -T npm bash -c "cd /app/backend && task test"