HedgeDoc - Fix 10/x

This commit is contained in:
KsmoinO 2022-11-19 18:57:17 +01:00
parent bd0bff6bc8
commit df8bd654d2
5 changed files with 23 additions and 24 deletions

View File

@ -12,7 +12,7 @@ hedgedoc:
script:
- cd podman-hedgedoc
#- ./ci_build-images.sh
- GARBAYE_HEDGEDOC_DATABASE_PASSWORD=ChohNiephuD1nec6 GARBAYE_HEDGEDOC_ENV_DOMAIN=localhost ./05_freshinstall.sh
- GARBAYE_HEDGEDOC_DATABASE_PASSWORD=ChohNiephuD1nec6 GARBAYE_HEDGEDOC_ENV_DOMAIN=qlf-hedgdoc.garbaye.fr ./05_freshinstall.sh
- ./20_enable.sh
- ./30_start.sh && sleep 10
- ./40_stop.sh

View File

@ -21,14 +21,14 @@ if podman volume exists ${datavolume} ; then
exit 1
fi
if podman volume exists ${uploadsvolume} ; then
echo "Error : UPLOADS volume ${uploadsvolume} already exists."
echo "Please remove it before a freshinstall, or continue with a standard installation."
exit 1
fi
#if podman volume exists ${uploadsvolume} ; then
# echo "Error : UPLOADS volume ${uploadsvolume} already exists."
# echo "Please remove it before a freshinstall, or continue with a standard installation."
# exit 1
#fi
podman volume create ${dbvolume}
podman volume create ${datavolume} && podman unshare chmod 0777 `get_podman_volume_path ${datavolume}`
podman volume create ${uploadsvolume} && podman unshare chmod 0777 `get_podman_volume_path ${uploadsvolume}`
podman volume create ${datavolume} #&& podman unshare chmod 0777 `get_podman_volume_path ${datavolume}`
#podman volume create ${uploadsvolume} && podman unshare chmod 0777 `get_podman_volume_path ${uploadsvolume}`
${ABSDIR}/10_install.sh

View File

@ -20,10 +20,10 @@ if ! podman volume exists ${datavolume} ; then
exit 1
fi
if ! podman volume exists ${uploadsvolume} ; then
echo "Error : UPLOADS volume ${uploasvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
exit 1
fi
#if ! podman volume exists ${uploadsvolume} ; then
# echo "Error : UPLOADS volume ${uploasvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
# exit 1
#fi
cat <<EOT >> .env
# HedgeDoc https://docs.hedgedoc.org/configuration/
@ -64,6 +64,8 @@ export hedgedoc_image
export hedgedoc_version
export database_image
export database_version
export dbvolume
export datavolume
if ! podman image exists ${hedgedoc_image}:${hedgedoc_version}; then
podman image pull ${hedgedoc_image}:${hedgedoc_version} || exit 1

View File

@ -19,7 +19,7 @@ services:
# - POSTGRES_PASSWORD=
# - POSTGRES_DB=hedgedoc
volumes:
- database:/var/lib/postgresql/data
- ${dbvolume}:/var/lib/postgresql/data
networks:
backend:
restart: always
@ -84,9 +84,8 @@ services:
# # **URL_ADDPORT** defines if generated links should contain the port.
# # Set this to false if your reverse uses the default ports (443 for HTTPS or 80 for HTTP).
# - CMD_URL_ADDPORT=true
#volumes:
# - uploads:/hedgedoc/public/uploads
# - data:/data
volumes:
- ${datavolume}:/hedgedoc/public/uploads
ports:
# Ports that are published to the outside.
# The latter port is the port inside the container. It should always stay on 3000
@ -109,6 +108,5 @@ networks:
# Define named volumes so data stays in place
volumes:
# Volume for PostgreSQL/MySQL database
database:
#uploads:
#data:
${dbvolume}
${datavolume}

View File

@ -11,8 +11,7 @@ project_name=${PWD##*/}
pod_name="pod_${project_name}"
service_name="pod-${pod_name}.service"
upstream_images="${hedgedoc_image} ${postgres_image}"
datavolume='podman-hedgedoc_data'
dbvolume='podman-hedgedoc_database'
uploadsvolume='podman-hedgedoc_uploads'
container_name='app'
db_container_name='database'
datavolume="${project_name}_data"
dbvolume="${project_name}_database"
container_name="${project_name}_app"
db_container_name="${project_name}_database"