new build scripts
This commit is contained in:
parent
cf4158466f
commit
9c0d56dfd2
3 changed files with 43 additions and 0 deletions
8
build-pleroma.sh
Executable file
8
build-pleroma.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ "$1" == "" ]]; then
|
||||||
|
echo "No commit ID provided"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
dt=$(date +"%Y%m%d")
|
||||||
|
podman build -f Containerfile --build-arg="PLEROMA_VER=$1" -t pleroma:run-$dt-$1
|
35
run-pleroma.sh
Executable file
35
run-pleroma.sh
Executable file
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
if [[ $1 == "" ]]; then
|
||||||
|
echo "No Image tag provided"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
echo Creating directories...
|
||||||
|
mkdir ./postgres
|
||||||
|
mkdir ./uploads
|
||||||
|
mkdir ./static
|
||||||
|
touch config.exs
|
||||||
|
chown -R 911:911 ./uploads
|
||||||
|
|
||||||
|
echo Stopping old `pleroma-web` container...
|
||||||
|
podman stop pleroma-web
|
||||||
|
podman rm pleroma-web
|
||||||
|
|
||||||
|
echo Creating new `pleroma-web` container...
|
||||||
|
podman run -d \
|
||||||
|
--name pleroma-web \
|
||||||
|
--pod pleroma-pod \
|
||||||
|
-v ./uploads:/var/lib/pleroma/uploads:z \
|
||||||
|
-v ./static:/var/lib/pleroma/static:z \
|
||||||
|
-v ./config.exs:/etc/pleroma/config.exs:ro \
|
||||||
|
-e DOMAIN=social.example.com \
|
||||||
|
-e INSTANCE_NAME=Pleroma \
|
||||||
|
-e ADMIN_EMAIL=admin@example.com \
|
||||||
|
-e NOTIFY_EMAIL=notify@example.com \
|
||||||
|
-e DB_USER=pleroma \
|
||||||
|
-e DB_PASS=pleroma \
|
||||||
|
-e DB_NAME=pleroma \
|
||||||
|
-e DB_HOST=localhost \
|
||||||
|
-e POSTGRES_HOST=localhost \
|
||||||
|
pleroma:$1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue