Update 34 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 9s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 9s
This commit is contained in:
@@ -27,7 +27,7 @@ bash "$SCRIPT_DIR/scripts/generate-config.sh" || _die "Failed to generate config
|
|||||||
# Start the client
|
# Start the client
|
||||||
echo "Starting Graylog Client..."
|
echo "Starting Graylog Client..."
|
||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
docker compose up -d || _die "Failed to start"
|
docker compose -p "${CONTAINER_NAME}" up -d || _die "Failed to start"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "========================================="
|
echo "========================================="
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
docker compose up -d || _die "Failed to start"
|
docker compose -p "${CONTAINER_NAME}" up -d || _die "Failed to start"
|
||||||
|
|
||||||
echo "Graylog client started"
|
echo "Graylog client started"
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
docker compose down || true
|
docker compose -p "${CONTAINER_NAME}" down || true
|
||||||
|
|
||||||
echo "Graylog client stopped"
|
echo "Graylog client stopped"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ _check_required_env_vars "CONTAINER_NAME"
|
|||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
|
|
||||||
# Stop and remove containers
|
# Stop and remove containers
|
||||||
docker compose down || true
|
docker compose -p "${CONTAINER_NAME}" down || true
|
||||||
|
|
||||||
# Remove the container if it still exists
|
# Remove the container if it still exists
|
||||||
_remove_container "$CONTAINER_NAME" 2>/dev/null || true
|
_remove_container "$CONTAINER_NAME" 2>/dev/null || true
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ bash "$SCRIPT_DIR/scripts/generate-config.sh" || _die "Failed to generate config
|
|||||||
|
|
||||||
# Start the client
|
# Start the client
|
||||||
echo "Starting Log Client..."
|
echo "Starting Log Client..."
|
||||||
docker compose up -d --build || _die "Failed to start"
|
docker compose -p "${CONTAINER_NAME}" up -d --build || _die "Failed to start"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "========================================="
|
echo "========================================="
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
docker compose up -d --build || _die "Failed to start"
|
docker compose -p "${CONTAINER_NAME}" up -d --build || _die "Failed to start"
|
||||||
echo "Log Client started"
|
echo "Log Client started"
|
||||||
@@ -2,5 +2,5 @@
|
|||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
docker compose stop || _die "Failed to stop"
|
docker compose -p "${CONTAINER_NAME}" stop || _die "Failed to stop"
|
||||||
echo "Log Client stopped"
|
echo "Log Client stopped"
|
||||||
@@ -2,5 +2,5 @@
|
|||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
docker compose down || true
|
docker compose -p "${CONTAINER_NAME}" down || true
|
||||||
echo "Log Client uninstalled"
|
echo "Log Client uninstalled"
|
||||||
@@ -36,7 +36,7 @@ fi
|
|||||||
|
|
||||||
# Start the stack
|
# Start the stack
|
||||||
echo "Starting Log Server..."
|
echo "Starting Log Server..."
|
||||||
docker compose up -d --build || _die "Failed to start"
|
docker compose -p "${CONTAINER_NAME}" up -d --build || _die "Failed to start"
|
||||||
|
|
||||||
# Wait for services
|
# Wait for services
|
||||||
echo -n "Waiting for services to start..."
|
echo -n "Waiting for services to start..."
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
docker compose logs "$@"
|
docker compose -p "${CONTAINER_NAME}" logs "$@"
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
docker compose up -d --build || _die "Failed to start"
|
docker compose -p "${CONTAINER_NAME}" up -d --build || _die "Failed to start"
|
||||||
echo "Log Server started"
|
echo "Log Server started"
|
||||||
@@ -2,5 +2,5 @@
|
|||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
docker compose stop || _die "Failed to stop"
|
docker compose -p "${CONTAINER_NAME}" stop || _die "Failed to stop"
|
||||||
echo "Log Server stopped"
|
echo "Log Server stopped"
|
||||||
@@ -2,5 +2,5 @@
|
|||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
docker compose down || true
|
docker compose -p "${CONTAINER_NAME}" down || true
|
||||||
echo "Log Server uninstalled (data preserved)"
|
echo "Log Server uninstalled (data preserved)"
|
||||||
@@ -17,7 +17,7 @@ echo "Dumping MariaDB database..."
|
|||||||
docker exec ${CONTAINER_NAME}_db mariadb-dump -u "$DB_USER" -p"$DB_PASSWORD" "$DB_NAME" > "${DATA_PATH}/database.sql" || _die "Failed to dump database"
|
docker exec ${CONTAINER_NAME}_db mariadb-dump -u "$DB_USER" -p"$DB_PASSWORD" "$DB_NAME" > "${DATA_PATH}/database.sql" || _die "Failed to dump database"
|
||||||
|
|
||||||
# Stop containers for consistent backup
|
# Stop containers for consistent backup
|
||||||
docker compose stop
|
docker compose -p "${CONTAINER_NAME}" stop
|
||||||
|
|
||||||
# Backup using dropshell's backup system
|
# Backup using dropshell's backup system
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
@@ -27,6 +27,6 @@ backup_items $(get_shlink_volumes) || _die "Failed to create backup"
|
|||||||
rm -f "${DATA_PATH}/database.sql"
|
rm -f "${DATA_PATH}/database.sql"
|
||||||
|
|
||||||
# Restart containers
|
# Restart containers
|
||||||
docker compose start
|
docker compose -p "${CONTAINER_NAME}" start
|
||||||
|
|
||||||
echo "Backup created successfully"
|
echo "Backup created successfully"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export IMAGE_REGISTRY IMAGE_REPO IMAGE_TAG DB_IMAGE_REGISTRY DB_IMAGE_REPO DB_IM
|
|||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
|
|
||||||
# Stop and remove containers
|
# Stop and remove containers
|
||||||
docker compose down
|
docker compose -p "${CONTAINER_NAME}" down
|
||||||
|
|
||||||
# Destroy data
|
# Destroy data
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ export IMAGE_REGISTRY IMAGE_REPO IMAGE_TAG DB_IMAGE_REGISTRY DB_IMAGE_REPO DB_IM
|
|||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
|
|
||||||
# Pull images
|
# Pull images
|
||||||
docker compose pull || _die "Failed to pull images"
|
docker compose -p "${CONTAINER_NAME}" pull || _die "Failed to pull images"
|
||||||
|
|
||||||
# Stop existing containers
|
# Stop existing containers
|
||||||
docker compose down 2>/dev/null || true
|
docker compose -p "${CONTAINER_NAME}" down 2>/dev/null || true
|
||||||
|
|
||||||
# Start containers
|
# Start containers
|
||||||
docker compose up -d || _die "Failed to start containers"
|
docker compose -p "${CONTAINER_NAME}" up -d || _die "Failed to start containers"
|
||||||
|
|
||||||
echo "Installation of ${CONTAINER_NAME} complete"
|
echo "Installation of ${CONTAINER_NAME} complete"
|
||||||
echo "Access Shlink at http://localhost:${HTTP_PORT}"
|
echo "Access Shlink at http://localhost:${HTTP_PORT}"
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
docker compose logs "$@"
|
docker compose -p "${CONTAINER_NAME}" logs "$@"
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ export IMAGE_REGISTRY IMAGE_REPO IMAGE_TAG DB_IMAGE_REGISTRY DB_IMAGE_REPO DB_IM
|
|||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
|
|
||||||
# Stop and remove containers before restore
|
# Stop and remove containers before restore
|
||||||
docker compose down
|
docker compose -p "${CONTAINER_NAME}" down
|
||||||
|
|
||||||
# Restore files using dropshell's restore system
|
# Restore files using dropshell's restore system
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
restore_items $(get_shlink_volumes) || _die "Failed to restore data from backup file"
|
restore_items $(get_shlink_volumes) || _die "Failed to restore data from backup file"
|
||||||
|
|
||||||
# Start database container only
|
# Start database container only
|
||||||
docker compose up -d db
|
docker compose -p "${CONTAINER_NAME}" up -d db
|
||||||
echo "Waiting for database to be ready..."
|
echo "Waiting for database to be ready..."
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
@@ -39,6 +39,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Start all containers
|
# Start all containers
|
||||||
docker compose up -d
|
docker compose -p "${CONTAINER_NAME}" up -d
|
||||||
|
|
||||||
echo "Restore complete! Service is running."
|
echo "Restore complete! Service is running."
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ export DB_NAME DB_USER DB_PASSWORD DB_ROOT_PASSWORD
|
|||||||
export IMAGE_REGISTRY IMAGE_REPO IMAGE_TAG DB_IMAGE_REGISTRY DB_IMAGE_REPO DB_IMAGE_TAG
|
export IMAGE_REGISTRY IMAGE_REPO IMAGE_TAG DB_IMAGE_REGISTRY DB_IMAGE_REPO DB_IMAGE_TAG
|
||||||
|
|
||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
docker compose up -d || _die "Failed to start containers"
|
docker compose -p "${CONTAINER_NAME}" up -d || _die "Failed to start containers"
|
||||||
|
|
||||||
echo "Container ${CONTAINER_NAME} started"
|
echo "Container ${CONTAINER_NAME} started"
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ export DB_NAME DB_USER DB_PASSWORD DB_ROOT_PASSWORD
|
|||||||
export IMAGE_REGISTRY IMAGE_REPO IMAGE_TAG DB_IMAGE_REGISTRY DB_IMAGE_REPO DB_IMAGE_TAG
|
export IMAGE_REGISTRY IMAGE_REPO IMAGE_TAG DB_IMAGE_REGISTRY DB_IMAGE_REPO DB_IMAGE_TAG
|
||||||
|
|
||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
docker compose stop || _die "Failed to stop containers"
|
docker compose -p "${CONTAINER_NAME}" stop || _die "Failed to stop containers"
|
||||||
|
|
||||||
echo "Container ${CONTAINER_NAME} stopped"
|
echo "Container ${CONTAINER_NAME} stopped"
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ export IMAGE_REGISTRY IMAGE_REPO IMAGE_TAG DB_IMAGE_REGISTRY DB_IMAGE_REPO DB_IM
|
|||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
|
|
||||||
# Stop and remove containers (but preserve data)
|
# Stop and remove containers (but preserve data)
|
||||||
docker compose down || _die "Failed to stop containers"
|
docker compose -p "${CONTAINER_NAME}" down || _die "Failed to stop containers"
|
||||||
|
|
||||||
echo "Uninstalled ${CONTAINER_NAME} (data preserved in ${DATA_PATH})"
|
echo "Uninstalled ${CONTAINER_NAME} (data preserved in ${DATA_PATH})"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ cp "$SCRIPT_DIR/config/dashboards/"*.json "${CONFIG_PATH}/dashboards/" 2>/dev/nu
|
|||||||
|
|
||||||
# Start the stack
|
# Start the stack
|
||||||
echo "Starting Simple Logs stack..."
|
echo "Starting Simple Logs stack..."
|
||||||
docker compose up -d || _die "Failed to start"
|
docker compose -p "${CONTAINER_NAME}" up -d || _die "Failed to start"
|
||||||
|
|
||||||
# Wait for Grafana to be ready
|
# Wait for Grafana to be ready
|
||||||
echo -n "Waiting for Grafana to start..."
|
echo -n "Waiting for Grafana to start..."
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
docker compose logs "$@"
|
docker compose -p "${CONTAINER_NAME}" logs "$@"
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
docker compose up -d || _die "Failed to start Simple Logs"
|
docker compose -p "${CONTAINER_NAME}" up -d || _die "Failed to start Simple Logs"
|
||||||
echo "Simple Logs started"
|
echo "Simple Logs started"
|
||||||
@@ -2,5 +2,5 @@
|
|||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
docker compose stop || _die "Failed to stop Simple Logs"
|
docker compose -p "${CONTAINER_NAME}" stop || _die "Failed to stop Simple Logs"
|
||||||
echo "Simple Logs stopped"
|
echo "Simple Logs stopped"
|
||||||
@@ -2,5 +2,5 @@
|
|||||||
source "${AGENT_PATH}/common.sh"
|
source "${AGENT_PATH}/common.sh"
|
||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
docker compose down || true
|
docker compose -p "${CONTAINER_NAME}" down || true
|
||||||
echo "Simple Logs uninstalled (data preserved)"
|
echo "Simple Logs uninstalled (data preserved)"
|
||||||
@@ -15,7 +15,7 @@ echo "Dumping PostgreSQL database..."
|
|||||||
docker exec ${CONTAINER_NAME}_db pg_dump -U "$DB_USER" "$DB_NAME" > "${DATA_PATH}/database.sql" || _die "Failed to dump database"
|
docker exec ${CONTAINER_NAME}_db pg_dump -U "$DB_USER" "$DB_NAME" > "${DATA_PATH}/database.sql" || _die "Failed to dump database"
|
||||||
|
|
||||||
# Stop containers for consistent backup
|
# Stop containers for consistent backup
|
||||||
docker compose stop
|
docker compose -p "${CONTAINER_NAME}" stop
|
||||||
|
|
||||||
# Backup using dropshell's backup system
|
# Backup using dropshell's backup system
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
@@ -25,6 +25,6 @@ backup_items $(get_wikijs_volumes) || _die "Failed to create backup"
|
|||||||
rm -f "${DATA_PATH}/database.sql"
|
rm -f "${DATA_PATH}/database.sql"
|
||||||
|
|
||||||
# Restart containers
|
# Restart containers
|
||||||
docker compose start
|
docker compose -p "${CONTAINER_NAME}" start
|
||||||
|
|
||||||
echo "Backup created successfully"
|
echo "Backup created successfully"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ echo "This includes all wiki pages, users, database, and configuration!"
|
|||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
|
|
||||||
# Stop and remove containers
|
# Stop and remove containers
|
||||||
docker compose down -v 2>/dev/null || true
|
docker compose -p "${CONTAINER_NAME}" down -v 2>/dev/null || true
|
||||||
|
|
||||||
# Remove data directory
|
# Remove data directory
|
||||||
rm -rf "${DATA_PATH}"
|
rm -rf "${DATA_PATH}"
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER
|
|||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
|
|
||||||
# Pull images
|
# Pull images
|
||||||
docker compose pull || _die "Failed to pull images"
|
docker compose -p "${CONTAINER_NAME}" pull || _die "Failed to pull images"
|
||||||
|
|
||||||
# Stop existing containers
|
# Stop existing containers
|
||||||
docker compose down 2>/dev/null || true
|
docker compose -p "${CONTAINER_NAME}" down 2>/dev/null || true
|
||||||
|
|
||||||
# Start containers (--build ensures fresh state)
|
# Start containers (--build ensures fresh state)
|
||||||
docker compose up -d --build || _die "Failed to start containers"
|
docker compose -p "${CONTAINER_NAME}" up -d --build || _die "Failed to start containers"
|
||||||
|
|
||||||
echo "Installation of ${CONTAINER_NAME} complete"
|
echo "Installation of ${CONTAINER_NAME} complete"
|
||||||
echo "Access Wiki.js at http://localhost:${HTTP_PORT}"
|
echo "Access Wiki.js at http://localhost:${HTTP_PORT}"
|
||||||
|
|||||||
@@ -10,5 +10,5 @@ cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
|||||||
|
|
||||||
echo "Container ${CONTAINER_NAME} logs:"
|
echo "Container ${CONTAINER_NAME} logs:"
|
||||||
_grey_start
|
_grey_start
|
||||||
docker compose logs "$@"
|
docker compose -p "${CONTAINER_NAME}" logs "$@"
|
||||||
_grey_end
|
_grey_end
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER
|
|||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
|
|
||||||
# Stop and remove containers before restore
|
# Stop and remove containers before restore
|
||||||
docker compose down
|
docker compose -p "${CONTAINER_NAME}" down
|
||||||
|
|
||||||
# Restore files using dropshell's restore system
|
# Restore files using dropshell's restore system
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
restore_items $(get_wikijs_volumes) || _die "Failed to restore data from backup file"
|
restore_items $(get_wikijs_volumes) || _die "Failed to restore data from backup file"
|
||||||
|
|
||||||
# Start database container only
|
# Start database container only
|
||||||
docker compose up -d db
|
docker compose -p "${CONTAINER_NAME}" up -d db
|
||||||
echo "Waiting for database to be ready..."
|
echo "Waiting for database to be ready..."
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
@@ -38,6 +38,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Start all containers
|
# Start all containers
|
||||||
docker compose up -d
|
docker compose -p "${CONTAINER_NAME}" up -d
|
||||||
|
|
||||||
echo "Restore complete! Service is running."
|
echo "Restore complete! Service is running."
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ _check_required_env_vars "CONTAINER_NAME" "DATA_PATH"
|
|||||||
export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER DB_PASS
|
export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER DB_PASS
|
||||||
|
|
||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
docker compose up -d || _die "Failed to start containers"
|
docker compose -p "${CONTAINER_NAME}" up -d || _die "Failed to start containers"
|
||||||
|
|
||||||
echo "Container ${CONTAINER_NAME} started"
|
echo "Container ${CONTAINER_NAME} started"
|
||||||
echo "Access Wiki.js at http://localhost:${HTTP_PORT}"
|
echo "Access Wiki.js at http://localhost:${HTTP_PORT}"
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ _check_required_env_vars "CONTAINER_NAME"
|
|||||||
export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER DB_PASS
|
export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER DB_PASS
|
||||||
|
|
||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
docker compose stop || _die "Failed to stop containers"
|
docker compose -p "${CONTAINER_NAME}" stop || _die "Failed to stop containers"
|
||||||
|
|
||||||
echo "Container ${CONTAINER_NAME} stopped"
|
echo "Container ${CONTAINER_NAME} stopped"
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER
|
|||||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||||
|
|
||||||
# Stop and remove containers (but preserve volumes/data)
|
# Stop and remove containers (but preserve volumes/data)
|
||||||
docker compose down || _die "Failed to stop containers"
|
docker compose -p "${CONTAINER_NAME}" down || _die "Failed to stop containers"
|
||||||
|
|
||||||
# Remove images
|
# Remove images
|
||||||
docker compose config --images | xargs -r docker rmi 2>/dev/null || true
|
docker compose -p "${CONTAINER_NAME}" config --images | xargs -r docker rmi 2>/dev/null || true
|
||||||
|
|
||||||
echo "Uninstallation of ${CONTAINER_NAME} complete."
|
echo "Uninstallation of ${CONTAINER_NAME} complete."
|
||||||
echo "Data preserved in ${DATA_PATH}. To remove all data, use destroy.sh"
|
echo "Data preserved in ${DATA_PATH}. To remove all data, use destroy.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user