Create persistent emoji mount (Fixes #8)

master
sn0w 2020-09-04 23:18:07 +02:00
parent caf0252937
commit 9398a1b816
No known key found for this signature in database
GPG Key ID: C45A6D698F224B39
4 changed files with 12 additions and 0 deletions

View File

@ -1,2 +1,3 @@
data/
cache/
emoji/

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
data/
cache/
emoji/
custom.d/
!custom.d/.gitkeep
config.exs

View File

@ -46,4 +46,5 @@ services:
- ./custom.d:/custom.d:ro
- ./config.exs:/home/pleroma/pleroma/config/prod.secret.exs:ro
- ./config.exs:/home/pleroma/pleroma/config/dev.secret.exs:ro
- ./emoji:/home/pleroma/pleroma/instance/static/emoji
- $DOCKER_DATADIR/uploads:/uploads

View File

@ -196,6 +196,15 @@ action__restart() {
}
action__start() {
if [[ ! -d ./data/uploads ]] || [[ ! -d ./emoji ]]; then
if [[ "$(id -u)" != "$DOCKER_UID" ]]; then
echo "Please create the folders ./data/uploads and ./emoji, and chown them to $DOCKER_UID"
exit 1
fi
mkdir -p ./data/uploads ./emoji
fi
docker_compose up --remove-orphans -d
}