This project is the backend server for flat-desktop.
- Register and login with Wechat.
Create these files with the format of config/.env.default:
config/.env.development.localconfig/.env.production.local
See Building Guides for available variables.
Then at project root, run:
yarn install --frozen-lockfile
yarn run startYou should Fork this project then add the environment variables at https://github.com/[user-name]/flat-server/settings/secrets/actions.
Available environment variables:
| Name | Description |
|---|---|
| DOCKERHUB_USERNAME | Your hub.docker.com user name |
| DOCKERHUB_TOKEN | The generated token at hub.docker settings |
| SERVER_PORT | The exposed public port of deployed service |
| WECHAT_APP_ID | AppID of Website Apps on Wechat Open Platform |
| WECHAT_APP_SECRET | AppSecret of Website Apps on Wechat Open Platform |
| REDIS_HOST | redis host |
| REDIS_PORT | redis port |
| REDIS_PASSWORD | redis password |
| REDIS_DB | redis db name |
| MYSQL_HOST | MySQL host |
| MYSQL_PORT | MySQL port |
| MYSQL_USER | MySQL user name |
| MYSQL_PASSWORD | MySQL password |
| MYSQL_DB | MySQL database name |
| SSH_HOST | Deployed SSH address |
| SSH_USERNAME | SSH user name |
| SSH_KEY | SSH key |
| SSH_PORT | SSH port |
Note that SSH_KEY is the secret key that is generated by ssh-keygen -t rsa -b 4096(starting with -----BEGIN OPENSSH PRIVATE KEY-----).
Then at the remote server, add the ssh public key to ~/.ssh/authorized_keys.