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
If a team member has already set up a Google Cloud Storage project, add the keys for that project to the same `.env` file. Otheriwse,
19
26
see the "Setting up a Google Cloud instance" section for how to set up a project.
20
27
@@ -71,33 +78,33 @@ export type SourceRow = {
71
78
timestamp?: string; // timestamp in the video
72
79
};
73
80
```
81
+
74
82
## Provided client
75
83
76
84
Open `localhost:8080/` to see the example of client provided.
77
85
The client is written in plain html/css/js in the `public` folder.
78
86
79
-
80
87
## Setting up a Google Cloud instance
81
88
82
89
### Set up Google Cloud storage & services
83
90
84
91
First create a new storage bucket:
92
+
85
93
- Create a Google Cloud project and a Google Cloud Storage bucket
86
94
- Add `GCLOUD_STORAGE_BUCKET=name-of-your-bucket` to your `.env`
87
95
- Make sure this bucket has public access so that anyone can read from it (to
88
-
make your reports accessible from your browser):
89
-
- Turn off the "Prevent public access" protect
90
-
- In the "Permissions" tab, click "Grant access." Add the principal `allUsers`
91
-
and assign the role `Storage Object User`.
96
+
make your reports accessible from your browser): - Turn off the "Prevent public access" protect - In the "Permissions" tab, click "Grant access." Add the principal `allUsers`
97
+
and assign the role `Storage Object User`.
92
98
93
99
Then create a service account for this bucket:
100
+
94
101
- In the "IAM & Admin" view, select "Service Accounts" from the left menu, and
95
102
then click "Create service account"
96
103
- Give this account the "Editor" role
97
104
- Create keys for this account and download them as a json file:
98
-
- Save this file as `./google-credentials.json`
99
-
- Encode this using by running the command `base64 -i ./google-credentials.json`
100
-
- Put this in a variable `GOOGLE_CREDENTIALS_ENCODED` in your `.env`
105
+
- Save this file as `./google-credentials.json`
106
+
- Encode this using by running the command `base64 -i ./google-credentials.json`
107
+
- Put this in a variable `GOOGLE_CREDENTIALS_ENCODED` in your `.env`
101
108
102
109
Your .env file should now look like this:
103
110
@@ -134,13 +141,13 @@ Note: the first deploy with fail if you haven't set the .env variables as descri
134
141
Your cloud instance is now ready to use!
135
142
136
143
To upload a new image (e.g. after a fresh git pull), deploy a new docker image to the same instance:
144
+
137
145
- Run `./bin/docker-build-gcloud.sh`
138
146
- Open the google console and search for gloud cloud run
139
147
- Find your project and the `tttc-light-js` app
140
148
- Click "EDIT AND DEPLOY NEW VERSION"
141
149
- Find the new docker image that you just pushed from the list of available images
142
150
143
-
144
151
## Using docker locally (not recommended)
145
152
146
153
There should be no need to use docker for local development, except when working on the Dockerfile or testing something docker-related, in which case you might want to use these scripts:
0 commit comments