HedgeDoc - Fix 16/x
This commit is contained in:
parent
898e096005
commit
fd958f1578
|
@ -25,7 +25,7 @@ fi
|
||||||
# exit 1
|
# exit 1
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
cat <<EOT >> .env
|
cat <<EOT > .env
|
||||||
# HedgeDoc https://docs.hedgedoc.org/configuration/
|
# HedgeDoc https://docs.hedgedoc.org/configuration/
|
||||||
## Node.JS
|
## Node.JS
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
@ -39,7 +39,7 @@ CMD_IMAGE_UPLOAD_TYPE=filesystem
|
||||||
## HedgeDoc Location
|
## HedgeDoc Location
|
||||||
CMD_DOMAIN=localhost
|
CMD_DOMAIN=localhost
|
||||||
CMD_URL_ADDPORT=true
|
CMD_URL_ADDPORT=true
|
||||||
CMD_ALLOW_ORIGIN=['localhost','${GARBAYE_HEDGEDOC_DOMAIN}']
|
CMD_ALLOW_ORIGIN=["localhost","${GARBAYE_HEDGEDOC_DOMAIN}"]
|
||||||
## Web security aspects
|
## Web security aspects
|
||||||
CMD_CSP_ALLOW_FRAMING=false
|
CMD_CSP_ALLOW_FRAMING=false
|
||||||
CMD_CSP_ALLOW_PDF_EMBED=false
|
CMD_CSP_ALLOW_PDF_EMBED=false
|
||||||
|
@ -77,9 +77,8 @@ if ! podman image exists ${database_image}:${database_version}; then
|
||||||
fi
|
fi
|
||||||
podman-compose --pod-args="--infra=true --infra-name=${project_name}_infra --share=" --podman-run-args "--requires=${project_name}_infra --env-file .env" up -d &&
|
podman-compose --pod-args="--infra=true --infra-name=${project_name}_infra --share=" --podman-run-args "--requires=${project_name}_infra --env-file .env" up -d &&
|
||||||
echo -n "Waiting for hedgedoc to finish starting " &&
|
echo -n "Waiting for hedgedoc to finish starting " &&
|
||||||
podman logs -f ${container_name}
|
( podman logs -f ${container_name} 2>&1 & ) | grep -q 'HTTP Server listening at ' &&
|
||||||
#( podman logs -f ${container_name} 2>&1 & ) | grep -q 'HTTP Server listening at ' &&
|
echo "OK" &&
|
||||||
#echo "OK" &&
|
podman pod stop ${pod_name} &&
|
||||||
#podman pod stop ${pod_name} &&
|
echo Pod built and stopped. &&
|
||||||
#echo Pod built and stopped. &&
|
shred -u .env
|
||||||
#shred -u .env
|
|
||||||
|
|
|
@ -19,10 +19,10 @@ services:
|
||||||
# - POSTGRES_PASSWORD=
|
# - POSTGRES_PASSWORD=
|
||||||
# - POSTGRES_DB=hedgedoc
|
# - POSTGRES_DB=hedgedoc
|
||||||
volumes:
|
volumes:
|
||||||
- podman-hedgedoc_database:/var/lib/postgresql/data
|
- database:/var/lib/postgresql/data
|
||||||
networks:
|
networks:
|
||||||
backend:
|
backend:
|
||||||
restart: always
|
#restart: always
|
||||||
|
|
||||||
# MySQL example
|
# MySQL example
|
||||||
# Most of the documentation that applies to PostgreSQL applies also to MySQL
|
# Most of the documentation that applies to PostgreSQL applies also to MySQL
|
||||||
|
@ -85,7 +85,7 @@ services:
|
||||||
# # Set this to false if your reverse uses the default ports (443 for HTTPS or 80 for HTTP).
|
# # Set this to false if your reverse uses the default ports (443 for HTTPS or 80 for HTTP).
|
||||||
# - CMD_URL_ADDPORT=true
|
# - CMD_URL_ADDPORT=true
|
||||||
volumes:
|
volumes:
|
||||||
- podman-hedgedoc_data:/hedgedoc/public/uploads
|
- data:/hedgedoc/public/uploads
|
||||||
ports:
|
ports:
|
||||||
# Ports that are published to the outside.
|
# Ports that are published to the outside.
|
||||||
# The latter port is the port inside the container. It should always stay on 3000
|
# The latter port is the port inside the container. It should always stay on 3000
|
||||||
|
@ -96,9 +96,9 @@ services:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
networks:
|
networks:
|
||||||
backend:
|
backend:
|
||||||
restart: always
|
#restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- ${db_container_name}
|
||||||
|
|
||||||
# Define networks to allow best isolation
|
# Define networks to allow best isolation
|
||||||
networks:
|
networks:
|
||||||
|
@ -108,5 +108,5 @@ networks:
|
||||||
# Define named volumes so data stays in place
|
# Define named volumes so data stays in place
|
||||||
volumes:
|
volumes:
|
||||||
# Volume for PostgreSQL/MySQL database
|
# Volume for PostgreSQL/MySQL database
|
||||||
podman-hedgedoc_database:
|
database:
|
||||||
podman-hedgedoc_data:
|
data:
|
||||||
|
|
|
@ -5,13 +5,13 @@ hedgedoc_version='1.9.6-alpine'
|
||||||
database_image="docker.io/library/postgres"
|
database_image="docker.io/library/postgres"
|
||||||
database_version='14.5-alpine'
|
database_version='14.5-alpine'
|
||||||
## mandatory ENV vars
|
## mandatory ENV vars
|
||||||
envvars='GARBAYE_HEDGEDOC_DATABASE_PASSWORD GARBAYE_HEDGEDOC_ENV_DOMAIN'
|
envvars='GARBAYE_HEDGEDOC_DATABASE_PASSWORD GARBAYE_HEDGEDOC_DOMAIN'
|
||||||
## internal vars : do not touch
|
## internal vars : do not touch
|
||||||
project_name=${PWD##*/}
|
project_name=${PWD##*/}
|
||||||
pod_name="pod_${project_name}"
|
pod_name="pod_${project_name}"
|
||||||
service_name="pod-${pod_name}.service"
|
service_name="pod-${pod_name}.service"
|
||||||
upstream_images="${hedgedoc_image} ${postgres_image}"
|
upstream_images="${hedgedoc_image} ${postgres_image}"
|
||||||
datavolume="data"
|
datavolume="${project_name}_data"
|
||||||
dbvolume="database"
|
dbvolume="${project_name}_database"
|
||||||
container_name="${project_name}_app"
|
container_name="${project_name}_app"
|
||||||
db_container_name="${project_name}_database"
|
db_container_name="${project_name}_database"
|
||||||
|
|
Loading…
Reference in a new issue