You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/doc/docs/deployment/gcp-app-engine.mdx
+44-3Lines changed: 44 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,9 @@ Before you begin to use Cloud Run on GCP, you need to do several things:
25
25
26
26
For more detailed instructions on how to setup the environment, you can [read more here](https://cloud.google.com/appengine/docs/standard/nodejs/building-app/creating-project).
27
27
28
-
## Step 2: Package your VulcanSQL project
28
+
## Step 2: Package your VulcanSQL API Server
29
29
30
-
In this guide, we'll deploy your VulcanSQL project without Docker. So please execute the following command in the terminal:
30
+
In this guide, we'll deploy your VulcanSQL API Server without Docker. So please execute the following command in the terminal:
31
31
32
32
```bash
33
33
vulcan package --output node
@@ -99,4 +99,45 @@ Congratulations! Now your VulcanSQL app is on the cloud and is ready to be share
99
99
100
100
:::info
101
101
If you need to clean up the resources on App Engine, you can [read the documentation here](https://cloud.google.com/appengine/docs/standard/python3/building-app/cleaning-up).
102
-
:::
102
+
:::
103
+
104
+
## Step 4: (Optional) Deploy your VulcanSQL API Catalog Server
105
+
106
+
If you need to deploy API Catalog Server, you should execute the following command in the terminal:
107
+
108
+
```shell
109
+
vulcan package -t catalog-server
110
+
```
111
+
112
+
:::caution
113
+
The folder generated by the command is also called `dist`, so if you had executed the command of packaging
114
+
API server, you should rename the `dist` folder generated previously to prevent from being overwritten.
115
+
:::
116
+
117
+
Now we need to do several things before deploying the app to App Engine:
118
+
119
+
**1. Add `"config": {"port": 8080}` to `config.json`**
120
+
121
+
Since App Engine accepts network traffic with the [port 8080](https://cloud.google.com/appengine/docs/flexible/custom-runtimes/build#listening_to_port_8080).
122
+
123
+
**2. Change the filename of `index.js` to `server.js` and also in `package.json`**
124
+
125
+
Since App Engine recognizes [`server.js`](https://cloud.google.com/appengine/docs/standard/nodejs/building-app/writing-web-service#running_the_server_locally) as the entry file.
126
+
127
+
**3. Create a new file `app.yaml` and fill in the following content**
128
+
129
+
```yaml
130
+
runtime: nodejs
131
+
env: flex
132
+
runtime_config:
133
+
operating_system: "ubuntu22"
134
+
runtime_version: "18"
135
+
env_variables:
136
+
VULCAN_SQL_HOST: [Your VulcanSQL API Server URL]
137
+
```
138
+
139
+
Finally, you execute the same Google Cloud CLI commands used in the step 3 in the terminal:
Copy file name to clipboardExpand all lines: packages/doc/docs/deployment/gcp-cloud-run.mdx
+28-3Lines changed: 28 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,9 @@ Before you begin to use Cloud Run on GCP, you need to do several things:
25
25
26
26
For more detailed instructions on how to setup the environment, you can [read more here](https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-nodejs-service#before-you-begin).
27
27
28
-
## Step 2: Package your VulcanSQL project
28
+
## Step 2: Package your VulcanSQL API Server
29
29
30
-
In this guide, we'll deploy the Docker version of your VulcanSQL project. So please execute the following command in the terminal:
30
+
In this guide, we'll deploy the Docker version of your VulcanSQL API Server. So please execute the following command in the terminal:
31
31
32
32
```bash
33
33
vulcan package --output docker
@@ -104,4 +104,29 @@ Congratulations! Now your VulcanSQL app is on the cloud and is ready to be share
104
104
105
105
:::info
106
106
If you need to clean up the resources on Cloud Run, you can [read the documentation here](https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-nodejs-service#clean-up).
107
-
:::
107
+
:::
108
+
109
+
## Step 4: (Optional) Deploy your VulcanSQL API Catalog Server
110
+
111
+
If you need to deploy API Catalog Server, you should execute the following command in the terminal:
112
+
113
+
```shell
114
+
vulcan package -t catalog-server -o docker
115
+
```
116
+
117
+
:::caution
118
+
The folder generated by the command is also called `dist`, so if you had executed the command of packaging
119
+
API server, you should rename the `dist` folder generated previously to prevent from being overwritten.
120
+
:::
121
+
122
+
Then, you should modify `API_BASE_URL` to the URL of your VulcanSQL API Server you just deployed in Dockerfile:
123
+
124
+
```dockerfile
125
+
ENV API_BASE_URL [URL of VulcanSQL API Server]
126
+
```
127
+
128
+
Finally, you execute the same Google Cloud CLI commands used in the step 3 in the terminal, and change any configurations if you need:
129
+
130
+
```
131
+
gloud run deploy [YOUR_CLOUDRUN_SERVICE_NAME] --port=4200 --allow-unauthenticated
0 commit comments