Update documentation and then some

This commit is contained in:
Andrei Jiroh Halili 2022-04-21 15:09:20 +00:00
parent 256aeef90b
commit d52b2f45ad
4 changed files with 32 additions and 8 deletions

View File

@ -8,9 +8,10 @@ stages:
default:
before_script:
- apk add bash coreutils wget
- echo WORKSPACE_PATH$PWD | tee ~/.librc >> /dev/null
- echo CREATED_AT=1650520343 | tee -a ~/.librc >> /dev/null
- echo $STDLIBRC | base64 -d | tee -a ~/.librc >> /dev/null
- |
wget --header="Authorization: bearer $$SNIPPET_BYPASS_TOKEN" $ENV_JSON_FILE" -O ./env.json
echo WORKSPACE_PATH$PWD | tee ~/.librc >> /dev/null
echo CREATED_AT=1650520343 | tee -a ~/.librc >> /dev/null
echo STDLIBRC | base64 -d | tee -a ~/.librc >> /dev/null
- |
wget --header="Authorization: bearer $SNIPPET_BYPASS_TOKEN" $ENV_JSON_FILE" -O ./env.json
- npm i

View File

@ -14,7 +14,16 @@ Requires Node.js 14+ and Autocode CLI if you want to do local development or eve
1. `npm install`
2. `npm start` to run an local FunctionScript gateway with hot reload included.
3. `curl -i http://localhost:8170/recaptime/rtapp-verify-backend/ping`
3. `curl -i http://localhost:8170/recaptime/rtapp-verify-backend/ping` to check if everything is ready
### Deployment
In order for this to work on your Autocode account, you need to update the value of `name` in `stdlib.json` to point to your namespace instead of pointing at `recaptime`. You also need to build your own `env.json` file before running `lib up dev`.
1. Authenticate with `lib login`.
2. Prepare `env.json` using the template from `env.example.json`. DO NOT COMMIT!
3. Update the value `name` to point to your namespace (e.g. `username/your-app-here`).
4. Deploy with `lib up dev`
## Getting help
@ -27,4 +36,4 @@ Requires Node.js 14+ and Autocode CLI if you want to do local development or eve
## Credits
* [Hakiki](https://discord.gg/hakiki) for the landing page guide: <https://hakiki.api.stdlib.com/blog@dev/landingpage.html>
* [Hakiki](https://discord.gg/hakiki) for the landing page guide: <https://hakiki.api.stdlib.com/blog@dev/landingpage.html>

14
env.example.json Normal file
View File

@ -0,0 +1,14 @@
{
"dev": {
"MONGO_DATABASE": "",
"GH_NAMESPACE": "RecapTimeSquad",
"GH_REPO_SLUG": "rtapp-verify-bot-testing",
"DISCORD_GUILD_ID": "953603786625146921",
"DISCORD_ROLE_ID": "953610409502449734",
"MW_OAUTH_ROOT": "https://meta.miraheze.org/w/rest.php",
"MW_OAUTH_CLIENT_ID": "123abc",
"MW_OAUTH_CLIENT_SECRET": "abc",
"MW_OAUTH_CALLBACK": "https://dev--rtapp-verify-backend.username.autocode.gg/oauth/mediawiki/callback/",
"TRIGGER_DEPLOY": "fbk3brkbjkrvbmebfk"
}
}

View File

@ -85,7 +85,7 @@
},
{
"name": "TRIGGER_DEPLOY",
"description": "Trigger an manual deploy"
"description": "Trigger an manual deploy, usually used only on CI/CD."
}
]
}
}