move migrate and static file setup to init container from docker entrypoint
This commit is contained in:
parent
e47a77a32e
commit
17ef031e43
3 changed files with 25 additions and 10 deletions
|
|
@ -46,6 +46,12 @@ spec:
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-credentials
|
- name: registry-credentials
|
||||||
initContainers:
|
initContainers:
|
||||||
|
- name: pleroma-static-files
|
||||||
|
image: cr.forge.lan/darkdork-dev/pleroma
|
||||||
|
command: [ "sh", "-c", "mkdir -p ${DATA}/uploads && mkdir -p ${DATA}/static && cp -rf /static-files/* ${DATA}/static" ]
|
||||||
|
- name: pleroma-migrate
|
||||||
|
image: cr.forge.lan/darkdork-dev/pleroma
|
||||||
|
command: [ "sh", "-c", "$HOME/bin/pleroma_ctl migrate" ]
|
||||||
- name: pleroma-database-wait
|
- name: pleroma-database-wait
|
||||||
image: cr.forge.lan/darkdork-dev/pleroma
|
image: cr.forge.lan/darkdork-dev/pleroma
|
||||||
command: [ "sh", "-c", "while ! pg_isready -U ${DB_USER} -d postgres://${DB_HOST}:${DB_PORT}/${DB_NAME} -t 1; do sleep 1s; done;" ]
|
command: [ "sh", "-c", "while ! pg_isready -U ${DB_USER} -d postgres://${DB_HOST}:${DB_PORT}/${DB_NAME} -t 1; do sleep 1s; done;" ]
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,5 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Move the files that were built into the image into the directory they will be served from
|
|
||||||
mkdir -p ${DATA}/uploads && mkdir -p ${DATA}/static
|
|
||||||
cp -rf /static-files/* ${DATA}/static
|
|
||||||
|
|
||||||
echo "-- Running migrations..."
|
|
||||||
$HOME/bin/pleroma_ctl migrate
|
|
||||||
|
|
||||||
echo "-- Starting!"
|
echo "-- Starting!"
|
||||||
exec $HOME/bin/pleroma start
|
exec $HOME/bin/pleroma start
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,9 @@ config :pleroma, :instance,
|
||||||
invites_enabled: true,
|
invites_enabled: true,
|
||||||
healthcheck: true
|
healthcheck: true
|
||||||
|
|
||||||
config :pleroma, :http, proxy_url: {:socks5h, "10.8.1.1", 1080}
|
config :pleroma, :http,
|
||||||
|
proxy_url: { :socks5, {10, 8, 0, 1}, 1080 }
|
||||||
|
|
||||||
|
|
||||||
config :pleroma, :media_proxy,
|
config :pleroma, :media_proxy,
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
|
@ -75,3 +77,17 @@ config :joken, default_signer: System.get_env("DEFAULT_SIGNER")
|
||||||
config :pleroma, configurable_from_database: false
|
config :pleroma, configurable_from_database: false
|
||||||
|
|
||||||
config :pleroma, Pleroma.Upload, filters: [Pleroma.Upload.Filter.Exiftool.StripLocation, Pleroma.Upload.Filter.Dedupe]
|
config :pleroma, Pleroma.Upload, filters: [Pleroma.Upload.Filter.Exiftool.StripLocation, Pleroma.Upload.Filter.Dedupe]
|
||||||
|
|
||||||
|
config :pleroma, :mrf,
|
||||||
|
policies: [
|
||||||
|
Pleroma.Web.ActivityPub.MRF.SimplePolicy,
|
||||||
|
Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
|
||||||
|
Pleroma.Web.ActivityPub.MRF.TagPolicy,
|
||||||
|
Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy,
|
||||||
|
Pleroma.Web.ActivityPub.MRF.HashtagPolicy
|
||||||
|
]
|
||||||
|
|
||||||
|
config :pleroma, :mrf_simple,
|
||||||
|
media_removal: [
|
||||||
|
"varishangout.net"
|
||||||
|
]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue