update init procedure

This commit is contained in:
red 2025-04-09 11:42:12 -04:00
parent 2bed1a8222
commit 57c5a7db61
3 changed files with 7 additions and 15 deletions

View file

@ -25,6 +25,7 @@ RUN rm -r /tmp/release
RUN rm /tmp/pleroma.zip
COPY --chmod=0764 --chown=pleroma:pleroma ./static-files/ /static-files/
COPY --chmod=0755 --chown=pleroma:pleroma ./init-pleroma.sh /
COPY --chmod=0755 --chown=pleroma:pleroma ./docker-entrypoint.sh ${HOME}
EXPOSE 4000

4
pleroma/init-pleroma.sh Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
while ! pg_isready -U ${DB_USER} -d postgres://${DB_HOST}:${DB_PORT}/${DB_NAME} -t 1; do sleep 1s; done;
mkdir -p ${DATA}/uploads && mkdir -p ${DATA}/static && cp -rf /static-files/* ${DATA}/static && chown -R 1000:1000 ${DATA}
exec "${HOME}/bin/pleroma_ctl migrate"