linuxserver / docker-mastodon

GNU General Public License v3.0
78 stars 15 forks source link

[BUG] <title> #73

Closed specked closed 1 year ago

specked commented 1 year ago

Is there an existing issue for this?

Current Behavior

When attempting to increase max toot length, I receive an error that yarn is not installed when I try to recompile: RAILS_ENV=production bundle exec rails assets:precompile

I get this output:

root@638ed262ea77:/app/www# RAILS_ENV=production bundle exec rails assets:precompile
Compiling...
Compilation failed:
yarn run v1.22.19
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

error Command "webpack" not found.

Expected Behavior

it should recompile sucessfully

Steps To Reproduce

  1. Docker running in Unraid
  2. https://kcore.org/2022/12/18/increasing-mastodon-post-length/
  3. run RAILS_ENV=production bundle exec rails assets:precompile
  4. 
    Compilation failed:
    yarn run v1.22.19
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    error Command "webpack" not found.```

Environment

- OS: Unraid
- Unraid app store

CPU architecture

x86-64

Docker creation

docker run
  -d
  --name='mastodon'
  --net='bridge'
  -e TZ="America/Chicago"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="XXX"
  -e HOST_CONTAINERNAME="mastodon"
  -e 'LOCAL_DOMAIN'='XXX.XXX.XXX'
  -e 'REDIS_HOST'='192.168.1.229'
  -e 'REDIS_PORT'='6379'
  -e 'DB_HOST'='192.168.1.229'
  -e 'DB_USER'='XXX'
  -e 'DB_NAME'='XXX'
  -e 'DB_PASS'='XXX'
  -e 'DB_PORT'='5432'
  -e 'ES_ENABLED'='false'
  -e 'SECRET_KEY_BASE'='XXX'
  -e 'OTP_SECRET'='XXX'
  -e 'SMTP_SERVER'='XXX.XXX.com'
  -e 'SMTP_PORT'='465'
  -e 'SMTP_LOGIN'='XXX@XXX.XXX'
  -e 'SMTP_PASSWORD'='XXX'
  -e 'SMTP_FROM_ADDRESS'='XXX@XXX.XXX'
  -e 'S3_ENABLED'='false'
  -e 'WEB_DOMAIN'='XXX.XXX.XXX'
  -e 'ES_HOST'='192.168.1.229'
  -e 'ES_PORT'='9200'
  -e 'S3_BUCKET'=''
  -e 'AWS_ACCESS_KEY_ID'=''
  -e 'AWS_SECRET_ACCESS_KEY'=''
  -e 'S3_ALIAS_HOST'=''
  -e 'SMTP_SSL'='true'
  -e 'SMTP_ENABLE_STARTTLS_AUTO'='false'
  -e 'SMTP_AUTH_METHOD'='plain'
  -e 'SMTP_OPENSSL_VERIFY_MODE'='none'
  -e 'SMTP_DELIVERY_METHOD'='smtp'
  -e 'VAPID_PRIVATE_KEY'='XXX'
  -e 'VAPID_PUBLIC_KEY'='XXX'
  -e 'LIBRE_TRANSLATE_ENDPOINT'='http://192.168.1.229:5000/'
  -e 'RAILS_ENV'='production'
  -e 'ALLOWED_PRIVATE_ADDRESSES'='192.168.1.229'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='https://XXX.XXX.XXX'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mastodon-logo.png'
  -p '8286:80/tcp'
  -p '4436:443/tcp'
  -v '/mnt/user/appdata/mastodon':'/config':'rw' 'lscr.io/linuxserver/mastodon'

6c242d85d0a2791fc9ddb8360d53fbdcc43e9eb4039ac62dfe14f6cf0dd78bc5

The command finished successfully!

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────

using keys found in /config/keys
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

thespad commented 1 year ago

Correct. We remove all build dependencies at the end of the build process to reduce the image size to a manageable point.

If you want to recompile parts of the install you'll need to reinstall those dependencies. The full set are here https://github.com/linuxserver/docker-mastodon/blob/main/Dockerfile#L27-L36, though you might not need all of them depending on what components you're building.

specked commented 1 year ago

Correct. We remove all build dependencies at the end of the build process to reduce the image size to a manageable point.

If you want to recompile parts of the install you'll need to reinstall those dependencies. The full set are here https://github.com/linuxserver/docker-mastodon/blob/main/Dockerfile#L27-L36, though you might not need all of them depending on what components you're building.

Could you point out to me how I can install webpack? that's the item I'm stuck on. Thanks

thespad commented 1 year ago

Webpack is a node package, so you'd probably have to run through the bundle install here: https://github.com/linuxserver/docker-mastodon/blob/main/Dockerfile#L55-L59C3 as just installing webpack on its own is likely to lead to you then missing other deps.

thespad commented 1 year ago

You might be better off just using the https://github.com/linuxserver/docker-mastodon/tree/glitch branch, which already has a larger post limit, amongst other tweaks.

specked commented 1 year ago

You might be better off just using the https://github.com/linuxserver/docker-mastodon/tree/glitch branch, which already has a larger post limit, amongst other tweaks.

Thank you for taking the time to help me.