got config generating

This commit is contained in:
Paul Wilde 2022-11-11 15:31:47 +00:00
parent 5ef66e5dde
commit e04ac6564e
4 changed files with 13 additions and 7 deletions

View file

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
mkdir ./uploads mkdir ./uploads ./static ./config -p
mkdir ./static
touch config.exs touch config.exs
chown -R 911:911 ./uploads chown -R 911:911 ./uploads

View file

@ -11,5 +11,6 @@ podman run -d \
-e POSTGRES_PASSWORD=$PG_PASS \ -e POSTGRES_PASSWORD=$PG_PASS \
-e POSTGRES_DB=$PG_NAME \ -e POSTGRES_DB=$PG_NAME \
-v ./postgres:/var/lib/postgresql/data \ -v ./postgres:/var/lib/postgresql/data \
-v ./config:/config:ro \
postgres:14.6-alpine postgres:14.6-alpine

View file

@ -2,18 +2,17 @@
source ./script_config.sh source ./script_config.sh
echo Stopping old `rebased-web` container... echo Stopping old 'rebased-web' container...
podman stop rebased-web podman stop rebased-web
podman rm rebased-web podman rm rebased-web
echo Creating new `rebased-web` container... echo Creating new 'rebased-web' container...
podman run -d \ podman run -d \
--name rebased-web \ --name rebased-web \
--pod rebased-pod \ --pod rebased-pod \
-v ./uploads:/var/lib/pleroma/uploads:z \ -v ./uploads:/var/lib/pleroma/uploads:z \
-v ./static:/var/lib/pleroma/static:z \ -v ./static:/var/lib/pleroma/static:z \
-v ./config:/var/lib/pleroma/config:z \ -v ./config:/config:rw \
-v ./config.exs:/etc/pleroma/config.exs:ro \
-e DOMAIN=social.example.com \ -e DOMAIN=social.example.com \
-e INSTANCE_NAME=rebased \ -e INSTANCE_NAME=rebased \
-e ADMIN_EMAIL=admin@example.com \ -e ADMIN_EMAIL=admin@example.com \

View file

@ -2,4 +2,11 @@
source ./script_config.sh source ./script_config.sh
podman exec -it rebased-web /opt/pleroma/bin/pleroma_ctl instance gen podman exec -it --user=0 --privileged rebased-web /opt/pleroma/bin/pleroma_ctl instance gen
echo "Check files in config - if all looks good rename generated_config.exs to prod.secret.exs"
if [ -f ./config/setup_db.sql ]; then
# run this in postgres container
echo hi
fi