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.

111 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
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. DATABASE_URL=postgresql://$DATA_DB_USER:$DATA_DB_PASS@$DATA_DB_HOST/gonano
  13. # Federation
  14. # Note: Changing LOCAL_DOMAIN or LOCAL_HTTPS at a later time will cause unwanted side effects.
  15. # LOCAL_DOMAIN should *NOT* contain the protocol part of the domain e.g https://example.com.
  16. LOCAL_DOMAIN=${APP_NAME}.nanoapp.io
  17. LOCAL_HTTPS=false
  18. # Use this only if you need to run mastodon on a different domain than the one used for federation.
  19. # You can read more about this option on https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Serving_a_different_domain.md
  20. # DO *NOT* USE THIS UNLESS YOU KNOW *EXACTLY* WHAT YOU ARE DOING.
  21. # WEB_DOMAIN=mastodon.example.com
  22. # Use this if you want to have several aliases handler@example1.com
  23. # handler@example2.com etc. for the same user. LOCAL_DOMAIN should not
  24. # be added. Comma separated values
  25. # ALTERNATE_DOMAINS=example1.com,example2.com
  26. # Application secrets
  27. # Generate each with the `rake secret` task (`nanobox run bundle exec rake secret`)
  28. PAPERCLIP_SECRET=$PAPERCLIP_SECRET
  29. SECRET_KEY_BASE=$SECRET_KEY_BASE
  30. OTP_SECRET=$OTP_SECRET
  31. # Registrations
  32. # Single user mode will disable registrations and redirect frontpage to the first profile
  33. # SINGLE_USER_MODE=true
  34. # Prevent registrations with following e-mail domains
  35. # EMAIL_DOMAIN_BLACKLIST=example1.com|example2.de|etc
  36. # Only allow registrations with the following e-mail domains
  37. # EMAIL_DOMAIN_WHITELIST=example1.com|example2.de|etc
  38. # Optionally change default language
  39. # DEFAULT_LOCALE=de
  40. # E-mail configuration
  41. # Note: Mailgun and SparkPost (https://sparkpo.st/smtp) each have good free tiers
  42. # If you want to use an SMTP server without authentication (e.g local Postfix relay)
  43. # then set SMTP_AUTH_METHOD and SMTP_OPENSSL_VERIFY_MODE to 'none' and
  44. # *comment* SMTP_LOGIN and SMTP_PASSWORD (leaving them blank is not enough).
  45. SMTP_SERVER=$SMTP_SERVER
  46. SMTP_PORT=587
  47. SMTP_LOGIN=$SMTP_LOGIN
  48. SMTP_PASSWORD=$SMTP_PASSWORD
  49. SMTP_FROM_ADDRESS=notifications@${APP_NAME}.nanoapp.io
  50. #SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
  51. #SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
  52. #SMTP_AUTH_METHOD=plain
  53. #SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt
  54. #SMTP_OPENSSL_VERIFY_MODE=peer
  55. #SMTP_ENABLE_STARTTLS_AUTO=true
  56. # 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.
  57. # PAPERCLIP_ROOT_PATH=/var/lib/mastodon/public-system
  58. # PAPERCLIP_ROOT_URL=/system
  59. # Optional asset host for multi-server setups
  60. # CDN_HOST=assets.example.com
  61. # S3 (optional)
  62. # S3_ENABLED=true
  63. # S3_BUCKET=
  64. # AWS_ACCESS_KEY_ID=
  65. # AWS_SECRET_ACCESS_KEY=
  66. # S3_REGION=
  67. # S3_PROTOCOL=http
  68. # S3_HOSTNAME=192.168.1.123:9000
  69. # S3 (Minio Config (optional) Please check Minio instance for details)
  70. # S3_ENABLED=true
  71. # S3_BUCKET=
  72. # AWS_ACCESS_KEY_ID=
  73. # AWS_SECRET_ACCESS_KEY=
  74. # S3_REGION=
  75. # S3_PROTOCOL=https
  76. # S3_HOSTNAME=
  77. # S3_ENDPOINT=
  78. # S3_SIGNATURE_VERSION=
  79. # Optional alias for S3 if you want to use Cloudfront or Cloudflare in front
  80. # S3_CLOUDFRONT_HOST=
  81. # Streaming API integration
  82. # STREAMING_API_BASE_URL=
  83. # Advanced settings
  84. # If you need to use pgBouncer, you need to disable prepared statements:
  85. # PREPARED_STATEMENTS=false
  86. # Cluster number setting for streaming API server.
  87. # If you comment out following line, cluster number will be `numOfCpuCores - 1`.
  88. STREAMING_CLUSTER_NUM=1
  89. # Docker mastodon user
  90. # If you use Docker, you may want to assign UID/GID manually.
  91. # UID=1000
  92. # GID=1000