Go to file
Zack 3de367c8fe
ci: fix (#98)
* feat: use self hosted runner

* fix: bash syntax

* fix: debug github runner user

* fix: debug github runner user - 2

* fix: try again

* fix: add clean up and upgrade rust toolchain

* fix: debug PATH

* fix: temporary disable docker build

* fix: try export path

* fix: resume build

* fix: add LANG env

* fix: use the compose plugin instead

* feat: upgrade to use docker compose plugin insead

* fix: add locale to dockerfile build

* feat: revert back to github actions

* fix: upgrade to use docker compose plugin

* fix: try revert to 1.69.0
2023-10-05 17:45:08 +08:00
.github ci: fix (#98) 2023-10-05 17:45:08 +08:00
.sqlx refactor: collab http (#89) 2023-10-04 16:59:03 +08:00
build ci: fix (#98) 2023-10-05 17:45:08 +08:00
cert fix: request fail caused by certificate issue 2023-03-15 09:32:23 +08:00
configuration feat: Gotrue admin api (#73) 2023-09-23 17:07:02 +08:00
docker ci: fix (#98) 2023-10-05 17:45:08 +08:00
libs feat: websocket config (#99) 2023-10-05 17:43:50 +08:00
migrations feat: File api (#70) 2023-09-27 10:21:37 +08:00
nginx feat: websocket config (#99) 2023-10-05 17:43:50 +08:00
src feat: websocket config (#99) 2023-10-05 17:43:50 +08:00
tests feat: websocket config (#99) 2023-10-05 17:43:50 +08:00
.dockerignore feat: use apply server migration when server starts (#30) 2023-09-12 15:12:08 +08:00
.gitignore refactor: save collab data in pg (#19) 2023-09-08 19:41:35 +08:00
Cargo.lock feat: websocket config (#99) 2023-10-05 17:43:50 +08:00
Cargo.toml refactor: collab http (#89) 2023-10-04 16:59:03 +08:00
Dockerfile feat: Autorefresh (#44) 2023-09-15 11:21:05 +08:00
LICENSE chore: add license 2023-07-28 21:05:27 +08:00
Makefile chore: remove redundant sqlx command (#22) 2023-09-08 22:51:16 +08:00
README.md ci: fix (#98) 2023-10-05 17:45:08 +08:00
dev.env feat: Gotrue admin api (#73) 2023-09-23 17:07:02 +08:00
docker-compose-dev.yml feat: File api (#68) 2023-09-22 15:10:41 +08:00
docker-compose.yml feat: Gotrue admin api (#73) 2023-09-23 17:07:02 +08:00
rustfmt.toml feat: ws connect (#3) 2023-05-08 19:03:50 +08:00

README.md

AppFlowy Cloud

  • Cloud Server for AppFlowy

Deployment

Environmental Variables before starting

  • you can set it explicitly(below) or in a .env file (use dev.env) as template
# authentication key, change this and keep the key safe and secret
GOTRUE_JWT_SECRET=secret_auth_pass

# enabled by default, if you dont want need email confirmation, set to false
GOTRUE_MAILER_AUTOCONFIRM=true

# if you enable mail confirmation, you need to set the SMTP configuration below
GOTRUE_SMTP_HOST=smtp.gmail.com
GOTRUE_SMTP_PORT=465
GOTRUE_SMTP_USER=email_sender@some_company.com
GOTRUE_SMTP_PASS=email_sender_password
GOTRUE_SMTP_ADMIN_EMAIL=comp_admin@@some_company.com

# Change 'localhost:9998' to the public host of machine that is running on.
# This is for email confirmation link
API_EXTERNAL_URL=http://localhost:9998

# Enable Google OAuth2, default: false, quick link for set up:
# https://console.cloud.google.com/apis/credentials
# https://console.cloud.google.com/apis/credentials/consent
GOTRUE_EXTERNAL_GOOGLE_ENABLED=false
GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=some_id
GOTRUE_EXTERNAL_GOOGLE_SECRET=some_secret
# Change 'localhost:9998' to the public host of machine that is running on.
GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=http://localhost:9998/callback
  • additional settings can be modified in docker-compose.yml

SSL Certificate

  • To use your own SSL, replace certificate.crt and private_key.key with your own in nginx/ssl/ directory

Start Cloud Server

docker-compose up -d

Ports

Host Server is required to expose the following Ports:

  • 443 (https)
  • 80 (http)

Local Development

Pre-requisites

You'll need to install:

Configuration

  • copy the configurations from dev.env to .env
  • edit the .env as required (such as SMTP configurations)

Run the dependency servers

docker compose --file docker-compose-dev.yml up -d

Install sqlx-cli

cargo install sqlx-cli

Run sqlx migration

sqlx database create
sqlx migrate run

Run the AppFlowy-Cloud server

cargo run

Run the tests

Test

cargo test

Debugging

  • Postgres
    export PGPASSWORD=password
    psql --host=localhost --username=postgres --port=5433
  • Redis
    redis-cli -p 6380