docs: Add 1 and update 13 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 49s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 49s
This commit is contained in:
@@ -1,31 +1,13 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/common.sh"
|
||||
_check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "DATA_PATH" "HTTP_PORT" "PUID" "PGID" "TZ" "DB_TYPE"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
_check_required_env_vars "CONTAINER_NAME" "DATA_PATH"
|
||||
|
||||
# START SCRIPT
|
||||
# The start script is required for all templates.
|
||||
# It is used to start the service on the server.
|
||||
# Export variables for docker compose
|
||||
export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER DB_PASS
|
||||
|
||||
DOCKER_RUN_CMD="docker run -d \
|
||||
--restart unless-stopped \
|
||||
--name ${CONTAINER_NAME} \
|
||||
-p ${HTTP_PORT}:3000 \
|
||||
-v ${DATA_PATH}/config:/config \
|
||||
-v ${DATA_PATH}/data:/data \
|
||||
-e PUID=${PUID} \
|
||||
-e PGID=${PGID} \
|
||||
-e TZ=${TZ} \
|
||||
-e DB_TYPE=${DB_TYPE} \
|
||||
${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}"
|
||||
|
||||
if ! _create_and_start_container "$DOCKER_RUN_CMD" "$CONTAINER_NAME"; then
|
||||
_die "Failed to start container ${CONTAINER_NAME}"
|
||||
fi
|
||||
|
||||
# Check if the container is running
|
||||
if ! _is_container_running "$CONTAINER_NAME"; then
|
||||
_die "Container ${CONTAINER_NAME} is not running"
|
||||
fi
|
||||
cd "$SCRIPT_DIR"
|
||||
docker compose up -d || _die "Failed to start containers"
|
||||
|
||||
echo "Container ${CONTAINER_NAME} started"
|
||||
echo "Access Wiki.js at http://localhost:${HTTP_PORT}"
|
||||
|
||||
Reference in New Issue
Block a user