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: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,8 +71,8 @@ select the correct project.
71
71
- Select "_Create Key_" from the pop-up menu.
72
72
- Select "JSON" from the Dialog Box.
73
73
74
-
A proper Key file will be downloaded to your local directory. It's important to safeguard that key file. For this example, we're going to name the file
75
-
`sync-spanner.json` and store it in a subdirectory called `./keys`
74
+
A proper key file will be downloaded to your local directory. It's important to safeguard that key file. For this example, we're going to name the file
75
+
`service-account.json`.
76
76
77
77
The proper key file is in JSON format. An example file is provided below, with private information replaced by "`...`"
78
78
@@ -91,15 +91,15 @@ The proper key file is in JSON format. An example file is provided below, with p
91
91
}
92
92
```
93
93
94
-
You can then specify the path to the key file using the environment variable `GOOGLE_APPLICATION_CREDENTIALS` when running the application.
95
-
96
-
e.g.
94
+
Note, that unlike MySQL, there is no automatic migrations facility. Currently Spanner schema must be hand edited and modified.
97
95
98
-
```bash
99
-
RUST_LOG=warn GOOGLE_APPLICATION_CREDENTIALS=`pwd`/keys/sync-spanner.json` cargo run -- --config sync.ini
100
-
```
96
+
To point to a GCP hosted Spanner instance from your local machine, follow these steps:
101
97
102
-
Note, that unlike MySQL, there is no automatic migrations facility. Currently Spanner schema must be hand edited and modified.
98
+
1. Download the key file as shown above.
99
+
2. Open `local.toml` and replace `database_url` with a link to your spanner instance.
100
+
3. Open the Makefile and ensure you've correctly set you `PATH_TO_GRPC_CERT`.
101
+
4.`make run_spanner`.
102
+
5. Visit `http://localhost:8000/__heartbeat__` to make sure the server is running.
103
103
104
104
### Running via Docker
105
105
This currently requires access to the [mozilla-rust-sdk](https://github.com/mozilla-services/mozilla-rust-sdk) repo. If you don't have it, this will be made public soon; we'll update the README here when that happens.
0 commit comments