new build scripts

This commit is contained in:
Paul Wilde 2022-10-24 16:24:43 +01:00
parent 9c0d56dfd2
commit 855f8d255c
2 changed files with 34 additions and 0 deletions

22
create-db.sh Normal file
View file

@ -0,0 +1,22 @@
#!/bin/bash
first=false
if [[ ! -d ./postgres ]]; then
mkdir ./postgres
$first=true
fi
podman run -d \
--name pleroma-db \
--pod pleroma-pod \
-e POSTGRES_USER=pleroma \
-e POSTGRES_PASSWORD=CHANGHEME \
-e POSTGRES_DB=pleroma \
-v ./postgres:/var/lib/postgresql/data \
postgres:12.1-alpine
if [[ $first == true ]]; then
podman exec -i pleroma-db psql -U pleroma -c "CREATE EXTENSION IF NOT EXISTS citext;"
exit 0
fi

12
create-pod.sh Normal file
View file

@ -0,0 +1,12 @@
#!/bin/bash
mkdir ./uploads
mkdir ./static
touch config.exs
chown -R 911:911 ./uploads
podman pod create \
--name pleroma-pod \
-p 4000:4000
bash ./create-db.sh