Skip to content

Commit

Permalink
Merge pull request #79 from Holo-Host/update-urls
Browse files Browse the repository at this point in the history
create qa deployment
  • Loading branch information
peeech authored Feb 29, 2024
2 parents 0ebcace + bfb64e2 commit f74a5dc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/deploy-to-qaNet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Continuous Deployment to qaNet

on:
push:
branches:
- QA

jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy server
steps:
- uses: actions/checkout@v2
- name: Publish to qaNet
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
workingDirectory: 'server'
environment: qanet
4 changes: 2 additions & 2 deletions server/src/routes/zt_registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const cleanUpMembers = (address, apiToken, networkId) => {
*/
const isVerifiedUser = async (email) => {
const mongodbApiKey = await SETTINGS.get('mongodb_api_key')
const mongodbApiUrl = "https://eu-central-1.aws.data.mongodb-api.com/app/data-fcrur/endpoint/data/v1/action/findOne"
const mongodbApiUrl = await SETTINGS.get('mongodb_api_url')

let headers = new Headers()
headers.append("Content-Type", "application/json")
Expand All @@ -93,7 +93,7 @@ const isVerifiedUser = async (email) => {
}
}

let resp = await fetch(mongodbApiUrl, {
let resp = await fetch(`${mongodbApiUrl}/action/findOne`, {
headers,
method: "POST",
body: JSON.stringify(filter)
Expand Down
9 changes: 8 additions & 1 deletion server/wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "devnet-auth-server"
account_id = "18ff2b4e6205b938652998cfca0d8cff"
route = "devnet-auth-server.holo.host/*"
route = "auth-server.dev.holotest.net/*"
compatibility_date = "2024-02-19"
main = "dist/main.js"
kv_namespaces = [
Expand All @@ -16,3 +16,10 @@ route = "auth-server.holo.host/*"
kv_namespaces = [
{ binding = "SETTINGS", id = "56ecfe1cf54d43839e2c867798e5003b"}
]

[env.qanet]
name = "qa-auth-server"
route = "auth-server.qa.holotest.net/*"
kv_namespaces = [
{ binding = "SETTINGS", id = "1cfdf3a9b75545408f9058d846648349"}
]

0 comments on commit f74a5dc

Please sign in to comment.