Compare commits

..

No commits in common. "79fc0de403c1764d8705eb8aae88e566f58b414a" and "fab9c4abeb856e7645e34104d3096d6214c69c34" have entirely different histories.

1 changed files with 21 additions and 28 deletions

View File

@ -64,20 +64,13 @@ WS_CONF_MATCH1="# ensure all static content can always be found first"
read -p "Set your etherpad docker admin password: " -r ETHERPAD_ADMIN_PASS read -p "Set your etherpad docker admin password: " -r ETHERPAD_ADMIN_PASS
install -m 600 /dev/null /var/opt/etherpad_details.txt
cat << EOF > /var/opt/etherpad_details.txt
ETHERPAD_ADMIN_PASS=$ETHERPAD_ADMIN_PASS
ETHERPAD_DB_USER=$ETHERPAD_DB_USER
ETHERPAD_DB_NAME=$ETHERPAD_DB_NAME
ETHERPAD_DB_PASS=$ETHERPAD_DB_PASS
EOF
# Make sure we can rely on the match strings. # Make sure we can rely on the match strings.
printf "> Testing match strings on config files.\n" printf "> Testing match strings on config files.\n"
test_match "$WS_MATCH1" "$WS_CONF" test_match "$WS_MATCH1" "$WS_CONF"
# Install required packages # Install required packages
install_ifnot docker.io install_ifnot docker.io
install_ifnot docker-compose
install_ifnot postgresql-"$PSGVER" install_ifnot postgresql-"$PSGVER"
# Create DB # Create DB
@ -88,26 +81,26 @@ CREATE USER ${ETHERPAD_DB_USER} WITH ENCRYPTED PASSWORD '${ETHERPAD_DB_PASS}';
GRANT ALL PRIVILEGES ON DATABASE ${ETHERPAD_DB_NAME} TO ${ETHERPAD_DB_USER}; GRANT ALL PRIVILEGES ON DATABASE ${ETHERPAD_DB_NAME} TO ${ETHERPAD_DB_USER};
DB DB
# Check fot docker if not running then execute # Set environment varibales for docker
if [ ! "$(docker ps -q -f name=etherpad)" ]; then mkdir /opt/etherpad
if [ "$(docker ps -aq -f status=exited -f name=etherpad)" ]; then cat << EOF > /opt/etherpad/.env
# cleanup DOCKER_COMPOSE_APP_ADMIN_PASSWORD="$ETHERPAD_ADMIN_PASS"
docker rm etherpad DOCKER_COMPOSE_APP_DB_CHARSET="utf8mb4"
fi DOCKER_COMPOSE_POSTGRES_HOST="localhost"
# run your container DOCKER_COMPOSE_POSTGRES_USER="$ETHERPAD_DB_USER"
docker run -d --restart always \ DOCKER_COMPOSE_POSTGRES_DATABASE="$ETHERPAD_DB_NAME"
--network=host \ DOCKER_COMPOSE_POSTGRES_PASSWORD="$ETHERPAD_DB_PASS"
--name etherpad \ DOCKER_COMPOSE_POSTGRES_PORT="5432"
-p 127.0.0.1:9001:9001 \ #DOCKER_COMPOSE_APP_DEFAULT_PAD_TEXT=
-e "ADMIN_PASSWORD=$ETHERPAD_ADMIN_PASS" \ DOCKER_COMPOSE_APP_DISABLE_IP_LOGGING="false"
-e "DB_TYPE=postgres" \ DOCKER_COMPOSE_APP_SOFFICE="null"
-e "DB_HOST=localhost" \ DOCKER_COMPOSE_APP_TRUST_PROXY="true"
-e "DB_PORT=5432" \ EOF
-e "DB_NAME=$ETHERPAD_DB_NAME" \ chmod 644 /opt/etherpad/.env
-e "DB_USER=$ETHERPAD_DB_USER" \ cp files/etherpad/docker-compose.yml /opt/etherpad/
-e "DB_PASS=$ETHERPAD_DB_PASS" \ chmod 644 /opt/etherpad/docker-compose.yml
etherpad/etherpad
fi docker-compose -f /opt/etherpad/docker-compose.yml up -d
# Tune webserver for Jitsi App control # Tune webserver for Jitsi App control