Skip to content

Latest commit

 

History

History
167 lines (122 loc) · 9.27 KB

README.md

File metadata and controls

167 lines (122 loc) · 9.27 KB

Appsemble Server

The official Appsemble Docker image

GitLab CI Prettier

Table of Contents

Installation

The Appsemble server is distributed as a Docker image.

To pull the latest version, run

docker pull appsemble/appsemble

Also a Docker image is built for each release.

docker pull appsemble/appsemble:$VERSION

Variables

The Appsemble Docker image can be configured using environment variables. Each variable can also be passed as a command line parameter instead, if desired.

Variable Default Description
DATABASE_HOST postgresql The host of the database to connect to. This defaults to the connected PostgreSQL container.
DATABASE_PORT 3306 The port of the database to connect to.
DATABASE_NAME The name of the database to connect to.
DATABASE_USER The user to use to login to the database.
DATABASE_PASSWORD The password to use to login to the database.
DATABASE_URL A connection string for the database to connect to. This is an alternative to the separate database related variables.
SENTRY_DSN The Sentry DSN to use for error reporting. See Sentry for details.
GITHUB_CLIENT_ID The OAuth2 client ID used for logging in with GitHub in Appsemble Studio.
GITHUB_CLIENT_SECRET The OAuth2 client secret used for logging in with GitHub in Appsemble Studio.
GITLAB_CLIENT_ID The OAuth2 client ID used for logging in with GitLab in Appsemble Studio.
GITLAB_CLIENT_SECRET The OAuth2 client secret used for logging in with GitLab in Appsemble Studio.
GOOGLE_CLIENT_ID The OAuth2 client ID used for logging in with Google in Appsemble Studio.
GOOGLE_CLIENT_SECRET The OAuth2 client secret used for logging in with Google in Appsemble Studio.
SMTP_HOST The host of the SMTP server to connect to.
SMTP_PORT The port of the SMTP server to connect to.
SMTP_SECURE false Use TLS when connecting to the SMTP server.
SMTP_USER The user to use to login to the SMTP server.
SMTP_PASS The password to use to login to the SMTP server.
SMTP_FROM The address to use when sending emails.
IMAP_HOST The host of the IMAP server to connect to.
IMAP_PORT The port of the IMAP server to connect to.
IMAP_SECURE false Use TLS when connecting to the IMAP server.
IMAP_USER The user to use to login to the IMAP server.
IMAP_PASS The password to use to login to the IMAP server.
IMAP_COPY_TO_SENT_FOLDER false If specified, sent email will be copied to the IMAP server's "Sent" folder.
ENABLE_APP_EMAIL_QUOTA false If specified, rate limiting will be applied to emails sent by apps without a custom mail server configured.
DAILY_APP_EMAIL_QUOTA 10 The maximum number of emails an app can send per day without a custom mail server configured.
ENABLE_APP_EMAIL_QUOTA_ALERTS false If specified, alerts will be sent to the Appsemble administrator when an app exceeds its daily quota.
DISABLE_REGISTRATION false If specified, user registration will be disabled on the server
HOST The external host on which the server is available. This should include the protocol, hostname, and optionally port.
REMOTE null A remote Appsemble server to connect to in order to synchronize blocks.

Setting up Social Login

In order to use social logins using third parties such as Google or GitLab, an application key and an application secret must be provided. Follow instructions below to enable login using these services.

When using social login, the HOST variable is required. This should be the full host on which the Appsemble server is available.

GitHub

Go to your GitHub OAuth2 Apps under Developer settings.

Add the following Authorization callback URL, where HOST is the actual value HOST variable.

{HOST}/callback

Example: https://example.com/callback.

Click Register application.

GitLab

Go to your GitLab profile applications page.

Add the following redirect URL, where HOST is the actual value HOST variable.

{HOST}/callback

Example: https://example.com/callback.

Check the read_user scope, and click Save application.

Google

Go to the Google Cloud console OAuth consent screen Add the scopes email and profile. Under Authorized domains, add the HOST variable. Fill in any missing information and click Save.

Now go to the Google Cloud console credentials page. Click Create credentialsOAuth client IDWeb application. Add the HOST variable under Authorized JavaScript origins. Under Authorized redirect URIs, add the following URI.

{HOST}/callback

Example: https://example.com/callback.

Check the read_user scope, and click Save application.

SMTP

To be able to send emails from your local environment, you need to set up or connect to an SMTP server.

A project that provides an email testing environment for developers is Mailpit. It acts as an SMTP server where you can view and test captured emails.

For connecting to the SMTP server, you need to obtain the following settings:

  • Host
  • Port
  • Username
  • Password

Server configuration

In the project’s root package.json you can define the following properties under "appsembleServer":

"smtp-host": "(SMTP Server)",
"smtp-port": "(SMTP Port)",
"smtp-user": "(SMTP Username)",
"smtp-pass": "(SMTP Password)",
"smtp-from": "(Standard email address to put as sender)"

These can also be used as CLI parameters.

License

LGPL-3.0-only © Appsemble