Skip to content

Latest commit

 

History

History
257 lines (149 loc) · 10.4 KB

File metadata and controls

257 lines (149 loc) · 10.4 KB

MakerNet Environmet Configuration

In production values must be configured carefully. The settings in env configure the environment variables of the application.

If you are in the virtual development environment, your can keep the default values. These reside in the .envrc file and need to be loaded with source .envrc.

Environment Variables

DATABASE_HOST

DNS name or IP address of the server hosting the PostgreSQL database of the application. This value is used by config/database.yml

DATABASE_USER and DATABASE_PASS

Credentials for the PostgreSQL user, as required in database.yml.

REDIS_HOST

DNS name or IP address of the server hosting the redis database.

ELASTICSEARCH_HOST

DNS name or IP address of the server hosting the ElasticSearch database.

SECRET_KEY_BASE

Used by Rails to verify the integrity of signed cookies. It can be generated by running rake secret.

DEVISE_SECRET_KEY

Used by the authentication system to generate random tokens, eg. for resetting passwords. It can be generated by running rake secret.

STRIPE_API_KEY & STRIPE_PUBLISHABLE_KEY

Key and secret used to identify you Stripe account through the API. Retrieve them from https://dashboard.stripe.com/account/apikeys.

STRIPE_CURRENCY

Currency used by stripe to charge the final customer. See https://support.stripe.com/questions/which-currencies-does-stripe-support for a list of available 3-letters ISO code.

BEWARE: The stripe currency cannot be changed during the application life.

Changing the currency after the application has already run, may result in several bugs and prevent the users to pay through stripe. So set this setting carefully before starting the application for the first time.

INVOICE_PREFIX

When payments are done on the platform, an invoice will be generated as a PDF file. The PDF file name will be of the form "(INVOICE_PREFIX) - (invoice ID) _ (invoice date) .pdf"

FABLAB_WITHOUT_PLANS

If set to 'true', the subscription plans will be fully disabled and invisible in the application. It is not recommended to disable plans if at least one subscription was took on the platform.

FABLAB_WITHOUT_SPACES

If set to 'false', enable the spaces management and reservation in the application. It is not recommended to disable spaces if at least one space reservation was made on the system.

DEFAULT_MAIL_FROM

When sending notification mails, the platform will use this address to identify the sender.

DELIVERY_METHOD

Configure the Rails' Action Mailer delivery method. See http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration for more details.

SMTP_ADDRESS, SMTP_PORT, SMTP_USER_NAME & SMTP_PASSWORD

When DELIVERY_METHOD is set to smtp, configure the SMTP server parameters. See http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration for more details.

DEFAULT_HOST, DEFAULT_PROTOCOL

There are used to build links to the application. DEFAULT_HOST should be your domain name and is also used to configure Google Analytics. DEFAULT_PROTOCOL can be either http or https (if you have already configured SSL).

GA_ID

Identifier of your Google Analytics account.

DISQUS_SHORTNAME

Unique identifier of your Disqus forum. Disqus forums are used to allow visitors to comment on projects. See https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname- for more information.

TWITTER_NAME

Identifier of the Twitter account, from witch the last tweet will be fetched and displayed on the home page. This value can be graphically overridden during the application's lifecycle in Admin/Customization/Home page/Twitter Feed. It will also be used for Twitter Card analytics.

TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET, TWITTER_ACCESS_TOKEN & TWITTER_ACCESS_TOKEN_SECRET

Keys and secrets to access the twitter API. Retrieve them from https://apps.twitter.com

FACEBOOK_APP_ID

This is optional. You can follow [this guide to get your personal App ID}(https://developers.facebook.com/docs/apps/register). If you do so, you'll be able to customize and get statistics about project shares on Facebook.

LOG_LEVEL

This parameter configures the logs verbosity. Available log levels can be found here.

ALLOWED_EXTENSIONS

Exhaustive list of file's extensions available for public upload as project's CAO attachements. Each item in the list must be separated from the others by a space char. You will probably want to check that this list match the ALLOWED_MIME_TYPES values below.

Please consider that allowing file archives (eg. ZIP) or binary executable (eg. EXE) may result in a dangerous security issue and must be avoided in any cases.

ALLOWED_MIME_TYPES

Exhaustive list of file's mime-types available for public upload as project's CAO attachements. Each item in the list must be separated from the others by a space char. You will probably want to check that this list match the ALLOWED_EXTENSIONS values above.

Please consider that allowing file archives (eg. application/zip) or binary executable (eg. application/exe) may result in a dangerous security issue and must be avoided in any cases.

MAX_IMAGE_SIZE

Maximum size (in bytes) allowed for image uploaded on the platform. This parameter concerns events, plans, user's avatars, projects and steps of projects. If this parameter is not specified the maximum size allowed will be 2MB.

ADMIN_EMAIL, ADMIN_PASSWORD

Credentials for the first admin user created when seeding the project. (Not present in env files because they are only used once when running the database seed with the command rake db:seed)

APP_LOCALE

Configure application's main localization and translation settings. Read about how language configuration works in MakerNet.

See config/locales/app.*.yml for a list of available locales. Default is en.

RAILS_LOCALE

Configure Ruby on Rails localization settings (currency, dates, number formats ...).

Please, be aware that the configured locale will imply the CURRENCY symbol used to generate invoices.

Eg.: configuring es-ES will set the currency symbol to but es-MX will set $ as currency symbol, so setting the RAILS_LOCALE to simple es (without country indication) will probably not do what you expect.

See config/locales/rails.*.yml for a list of available locales. Default is en.

If your locale is not present in that list or any locale doesn't have your exact expectations, please open a pull request to share your modifications with the community and obtain a rebuilt docker image. You can find templates of these files at https://github.com/svenfuchs/rails-i18n/tree/rails-4-x/rails/locale.

MOMENT_LOCALE

Configure the moment.js library for l10n.

See vendor/assets/components/moment/locale/*.js for a list of available locales. Default is en (even if it's not listed).

SUMMERNOTE_LOCALE

Configure the javascript summernote editor for l10n.

See vendor/assets/components/summernote/lang/summernote-*.js for a list of available locales. Default is en-US (even if it's not listed).

ANGULAR_LOCALE

Configure the locale for angular-i18n.

Please, be aware that the configured locale will imply the CURRENCY displayed to front-end users.

Eg.: configuring fr-fr will set the currency symbol to but fr-ca will set $ as currency symbol, so setting the ANGULAR_LOCALE to simple fr (without country indication) will probably not do what you expect.

See vendor/assets/components/angular-i18n/angular-locale_*.js for a list of available locales. Default is en.

MESSAGEFORMAT_LOCALE

Configure the messageformat.js library, used by angular-translate.

See vendor/assets/components/messageformat/locale/*.js for a list of available locales.

FULLCALENDAR_LOCALE

Configure the fullCalendar JS agenda library.

See vendor/assets/components/fullcalendar/dist/lang/*.js for a list of available locales. Default is en (even if it's not listed).

ELASTICSEARCH_LANGUAGE_ANALYZER

This configure the language analyzer for indexing and searching in projects with ElasticSearch. See https://www.elastic.co/guide/en/elasticsearch/reference/1.7/analysis-lang-analyzer.html for a list of available analyzers (check that the doc version match your installed elasticSearch version).

TIME_ZONE

In Rails: set Time.zone default to the specified zone and make Active Record auto-convert to this zone. Run rake time:zones:all for a list of available time zone names. Default is UTC.

WEEK_STARTING_DAY

Configure the first day of the week in your locale zone (generally monday or sunday).

D3_DATE_FORMAT

Date format for dates displayed in statistics charts. See https://github.com/mbostock/d3/wiki/Time-Formatting#format for available formats.

UIB_DATE_FORMAT

Date format for dates displayed and parsed in date pickers. See https://angular-ui.github.io/bootstrap/#uibdateparser-s-format-codes for a list available formats.

BEWARE: years format with less than 4 digits will result in problems because the system won't be able to distinct dates with the same less significant digits, eg. 50 could mean 1950 or 2050.

EXCEL_DATE_FORMAT

Date format for dates shown in exported Excel files (eg. statistics) See https://support.microsoft.com/en-us/kb/264372 for a list a available formats.

Virtual Environment Variables

The following variables are active under the virtual development environment to help the application to with some issues.

VIRTUAL_DEV_ENV

Applies configuration settings to improve the performance of the application when it is run under the virtual development environment. It must be set to true.

RACK_ENV

Sets the environment behaviour for some dependencies. It must be set to development.

SSL_CERT_DIR

Indicates the default route to the directory where certificates are stored. For the virtualized Ubuntu environment it is /etc/ssl/certs.

SSL_CERT_FILE

Indicates the default file name where certificates are stored. For the virtualized Ubuntu environment it is ca-certificates.crt.

Additional Configuration

The software that MakerNet is based on, includes capabilities that are not exploited at the moment, but you can find more information on their configuration at the additional capabilities section.