You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
3.7 KiB

Add Support for Nanobox (#1709) * Nanobox Support - Added support for running Mastodon using Nanobox, both for local development, and for deployment to production - Dev mode tested and is working properly - Deployment is undergoing test as of this writing. If it works, this line will be amended to state success; if not, one or more subsequent commits will provide fixes. * [nanobox] Resolve Deploy Issues Everything seems to work except routing to the streaming API. Will investigate with the Nanobox staff and make fix commits if needed. Changes made: - Also need `NODE_ENV` in production - Node runs on `:4000` - Use `envsubst` to commit `.env.production` values, since `dotEnv` packages don't always support referencing other variables - Can't precompile assets after `transform` hook, but do this locally so it only has to be done once. - Rails won't create `production.log` on its own, so we do this ourselves. - Some `start` commands run from `/data/` for some reason, so use absolute paths in command arguments * [nanobox] Update Ruby version * [nanobox] Fix db.rake Ruby code style issues * [nanobox] Minor Fixes Some minor adjustments to improve functionality: - Fixed routing to `web.stream` instances - Adjust `.env.nanobox` to properly generate a default `SMTP_FROM_ADDRESS` via `envsubst` - Update Nginx configs to properly support the needed HTTP version and headers for proper functionality (the streaming API doesn't work without some of these settings in place) * [nanobox] Move usage info to docs repo * [nanobox] Updates for 1.2.x - Need to leave out `pkg-config` since Nanobox deploys without Ruby's headers - create a gem group to exclude the gem during Nanobox installs, but allow it to remain part of the default set otherwise - Update cron jobs to cover new/updated Rake tasks - Update `.env.nanobox` to include latest defaults and additions * [nanobox] Fix for nokogumbo, added in 1.3.x Apparently, nokogumbo (pulled in by sanitize, added with `OEmbed Support for PreviewCard` (#2337) - 88725d6) tries to install before nokogiri, despite needing nokogiri available to build properly. Instruct it to use the same settings as nokogiri does when building nokogiri directly, instead of via bundler. * [nanobox] Set NODE_ENV during asset compile The switch to WebPack will rely on the local value of the NODE_ENV evar, so set it to production during asset compilation. * [nanobox] Rebase on master; update Nginx configs - `pkg-config` Gem no longer causes issues in Nanobox, so revert the Gemfile change which allowed excluding it - Update Nginx configuration files with latest recommendations from production documentation - Rebase on master to Get This Merged™ Everything should be golden!
7 years ago
  1. # Service dependencies
  2. # You may set REDIS_URL instead for more advanced options
  3. REDIS_HOST=$DATA_REDIS_HOST
  4. REDIS_PORT=6379
  5. # REDIS_DB=0
  6. # You may set DATABASE_URL instead for more advanced options
  7. DB_HOST=$DATA_DB_HOST
  8. DB_USER=$DATA_DB_USER
  9. DB_NAME=gonano
  10. DB_PASS=$DATA_DB_PASS
  11. DB_PORT=5432
  12. # Federation
  13. # Note: Changing LOCAL_DOMAIN or LOCAL_HTTPS at a later time will cause unwanted side effects.
  14. # LOCAL_DOMAIN should *NOT* contain the protocol part of the domain e.g https://example.com.
  15. LOCAL_DOMAIN=${APP_NAME}.nanoapp.io
  16. LOCAL_HTTPS=false
  17. # Use this only if you need to run mastodon on a different domain than the one used for federation.
  18. # You can read more about this option on https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Serving_a_different_domain.md
  19. # DO *NOT* USE THIS UNLESS YOU KNOW *EXACTLY* WHAT YOU ARE DOING.
  20. # WEB_DOMAIN=mastodon.example.com
  21. # Use this if you want to have several aliases handler@example1.com
  22. # handler@example2.com etc. for the same user. LOCAL_DOMAIN should not
  23. # be added. Comma separated values
  24. # ALTERNATE_DOMAINS=example1.com,example2.com
  25. # Application secrets
  26. # Generate each with the `rake secret` task (`nanobox run bundle exec rake secret`)
  27. PAPERCLIP_SECRET=$PAPERCLIP_SECRET
  28. SECRET_KEY_BASE=$SECRET_KEY_BASE
  29. OTP_SECRET=$OTP_SECRET
  30. # Registrations
  31. # Single user mode will disable registrations and redirect frontpage to the first profile
  32. # SINGLE_USER_MODE=true
  33. # Prevent registrations with following e-mail domains
  34. # EMAIL_DOMAIN_BLACKLIST=example1.com|example2.de|etc
  35. # Only allow registrations with the following e-mail domains
  36. # EMAIL_DOMAIN_WHITELIST=example1.com|example2.de|etc
  37. # Optionally change default language
  38. # DEFAULT_LOCALE=de
  39. # E-mail configuration
  40. # Note: Mailgun and SparkPost (https://sparkpo.st/smtp) each have good free tiers
  41. # If you want to use an SMTP server without authentication (e.g local Postfix relay)
  42. # then set SMTP_AUTH_METHOD and SMTP_OPENSSL_VERIFY_MODE to 'none' and
  43. # *comment* SMTP_LOGIN and SMTP_PASSWORD (leaving them blank is not enough).
  44. SMTP_SERVER=$SMTP_SERVER
  45. SMTP_PORT=587
  46. SMTP_LOGIN=$SMTP_LOGIN
  47. SMTP_PASSWORD=$SMTP_PASSWORD
  48. SMTP_FROM_ADDRESS=notifications@${APP_NAME}.nanoapp.io
  49. #SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
  50. #SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
  51. #SMTP_AUTH_METHOD=plain
  52. #SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt
  53. #SMTP_OPENSSL_VERIFY_MODE=peer
  54. #SMTP_ENABLE_STARTTLS_AUTO=true
  55. # Optional user upload path and URL (images, avatars). Default is :rails_root/public/system. If you set this variable, you are responsible for making your HTTP server (eg. nginx) serve these files.
  56. # PAPERCLIP_ROOT_PATH=/var/lib/mastodon/public-system
  57. # PAPERCLIP_ROOT_URL=/system
  58. # Optional asset host for multi-server setups
  59. # CDN_HOST=assets.example.com
  60. # S3 (optional)
  61. # S3_ENABLED=true
  62. # S3_BUCKET=
  63. # AWS_ACCESS_KEY_ID=
  64. # AWS_SECRET_ACCESS_KEY=
  65. # S3_REGION=
  66. # S3_PROTOCOL=http
  67. # S3_HOSTNAME=192.168.1.123:9000
  68. # S3 (Minio Config (optional) Please check Minio instance for details)
  69. # S3_ENABLED=true
  70. # S3_BUCKET=
  71. # AWS_ACCESS_KEY_ID=
  72. # AWS_SECRET_ACCESS_KEY=
  73. # S3_REGION=
  74. # S3_PROTOCOL=https
  75. # S3_HOSTNAME=
  76. # S3_ENDPOINT=
  77. # S3_SIGNATURE_VERSION=
  78. # Optional alias for S3 if you want to use Cloudfront or Cloudflare in front
  79. # S3_CLOUDFRONT_HOST=
  80. # Streaming API integration
  81. # STREAMING_API_BASE_URL=
  82. # Advanced settings
  83. # If you need to use pgBouncer, you need to disable prepared statements:
  84. # PREPARED_STATEMENTS=false
  85. # Cluster number setting for streaming API server.
  86. # If you comment out following line, cluster number will be `numOfCpuCores - 1`.
  87. STREAMING_CLUSTER_NUM=1
  88. # Docker mastodon user
  89. # If you use Docker, you may want to assign UID/GID manually.
  90. # UID=1000
  91. # GID=1000