From bad8c43d3dceed91b860b4583295cd071baf2240 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Mon, 14 Nov 2022 14:51:45 +0000 Subject: [PATCH] alpine fork, correct permissions, appears working now --- 00-create-pod.sh | 5 ++--- 30-run-rebased.sh | 1 + Containerfile | 2 ++ script_config.sh | 1 + script_config_sample.sh | 12 ++++++++++++ 5 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 script_config_sample.sh diff --git a/00-create-pod.sh b/00-create-pod.sh index 3ba00a2..8f48a5a 100755 --- a/00-create-pod.sh +++ b/00-create-pod.sh @@ -5,8 +5,7 @@ mkdir ./uploads ./static ./config -p if [ ! -f ./script_config.sh ]; then cp ./script_config_sample.sh ./script_config.sh fi - +source ./script_config.sh podman pod create \ --name rebased-pod \ - -p 5000:5000 \ - -p 4000:4000 + -p $PORT:5000 diff --git a/30-run-rebased.sh b/30-run-rebased.sh index 55ced45..9835375 100755 --- a/30-run-rebased.sh +++ b/30-run-rebased.sh @@ -6,6 +6,7 @@ touch ./config/prod.secret.exs echo Stopping old 'rebased-web' container... podman stop rebased-web podman rm rebased-web +chmod -R 777 uploads echo Creating new 'rebased-web' container... podman run -d \ diff --git a/Containerfile b/Containerfile index 40130d7..6b62d24 100644 --- a/Containerfile +++ b/Containerfile @@ -66,4 +66,6 @@ RUN chmod +x ${HOME}/docker-entrypoint.sh EXPOSE 5000 +WORKDIR /var/lib/pleroma + ENTRYPOINT ["/opt/pleroma/docker-entrypoint.sh"] diff --git a/script_config.sh b/script_config.sh index f9f1c57..0b27bc7 100644 --- a/script_config.sh +++ b/script_config.sh @@ -1,6 +1,7 @@ #!/bin/bash DATE=$(date +"%Y-%m-%d") +PORT=5000 PG_USER=rebased PG_PASS=rebased PG_HOST=localhost diff --git a/script_config_sample.sh b/script_config_sample.sh new file mode 100644 index 0000000..0b27bc7 --- /dev/null +++ b/script_config_sample.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +DATE=$(date +"%Y-%m-%d") +PORT=5000 +PG_USER=rebased +PG_PASS=rebased +PG_HOST=localhost +PG_NAME=rebased +REBASED_VER=develop + +REBASED_IMG="rebased-$REBASED_VER-$DATE" +echo $REBASED_IMG