Update wikijs/install.sh
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 39s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 39s
This commit is contained in:
@@ -1,13 +1,29 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/common.sh"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
_check_required_env_vars "CONTAINER_NAME" "DATA_PATH"
|
||||
_check_required_env_vars "CONTAINER_NAME" "DATA_PATH" "DB_NAME" "DB_USER" "DB_PASS"
|
||||
|
||||
_check_docker_installed || _die "Docker test failed, aborting installation..."
|
||||
|
||||
# Create data directories
|
||||
mkdir -p "${DATA_PATH}/config" "${DATA_PATH}/data" "${DATA_PATH}/postgres"
|
||||
|
||||
# Create config.yml for Wiki.js to use PostgreSQL
|
||||
cat > "${DATA_PATH}/config/config.yml" << EOF
|
||||
port: 3000
|
||||
bindIP: 0.0.0.0
|
||||
|
||||
db:
|
||||
type: postgres
|
||||
host: ${CONTAINER_NAME}_db
|
||||
port: 5432
|
||||
user: ${DB_USER}
|
||||
pass: ${DB_PASS}
|
||||
db: ${DB_NAME}
|
||||
|
||||
dataPath: /data
|
||||
EOF
|
||||
|
||||
# Export variables for docker compose
|
||||
export CONTAINER_NAME DATA_PATH HTTP_PORT PUID PGID TZ IMAGE_TAG DB_NAME DB_USER DB_PASS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user