Skip to content

Commit

Permalink
Fix precompile issue
Browse files Browse the repository at this point in the history
Yarn has to be started via corepack in the Mastodon directory.
  • Loading branch information
dhelonious committed Sep 20, 2024
1 parent de89775 commit 282b953
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Empty file modified src/mastodon/bin/pre-migrate_if_required
100644 → 100755
Empty file.
5 changes: 5 additions & 0 deletions src/mastodon/bin/yarn
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

. "$SNAP/mastodon.env"

cd "$MASTODON_DIR" && corepack yarn "$@"
7 changes: 6 additions & 1 deletion src/mastodon/mastodon.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ update_paths node
update_paths libvips
update_paths ffmpeg

export HOME="$MASTODON_DIR"
export XDG_CONFIG_HOME="$HOME"

export MASTODON_DBUSER=mastodon
Expand Down Expand Up @@ -79,6 +78,12 @@ if mastodon_config_exists; then
export ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY="$(mastodon_get_var ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY)"
export ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT="$(mastodon_get_var ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT)"
export ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY="$(mastodon_get_var ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY)"
else
export OTP_SECRET=precompile_placeholder
export SECRET_KEY_BASE=precompile_placeholder
export ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=precompile_placeholder
export ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=precompile_placeholder
export ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=precompile_placeholder
fi

mastodon_rake() {
Expand Down

0 comments on commit 282b953

Please sign in to comment.