forked from yoshidan/google-cloud-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (51 loc) · 1.57 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: "3.8"
services:
spanner:
image: gcr.io/cloud-spanner-emulator/emulator
ports:
- "9020:9020"
- "9010:9010"
spanner-init:
image: gcr.io/google.com/cloudsdktool/cloud-sdk:slim
links:
- spanner
command: >
bash -c 'gcloud config configurations create emulator &&
gcloud config set auth/disable_credentials true &&
gcloud config set project local-project &&
gcloud config set api_endpoint_overrides/spanner http://spanner:9020/ &&
gcloud config set auth/disable_credentials true &&
gcloud spanner instances create test-instance --config=emulator-config --description=Emulator --nodes=1'
spanner-create:
image: mercari/wrench
command: create --directory /ddl
volumes:
- ./tests/ddl:/ddl
environment:
SPANNER_PROJECT_ID: local-project
SPANNER_INSTANCE_ID: test-instance
SPANNER_DATABASE_ID: local-database
SPANNER_EMULATOR_HOST: spanner:9010
links:
- spanner
depends_on:
- spanner-init
spanner-drop:
image: mercari/wrench
command: drop
environment:
SPANNER_PROJECT_ID: local-project
SPANNER_INSTANCE_ID: test-instance
SPANNER_DATABASE_ID: local-database
SPANNER_EMULATOR_HOST: spanner:9010
links:
- spanner
depends_on:
- spanner-init
spanner-cli:
image: sjdaws/spanner-cli:latest
environment:
SPANNER_EMULATOR_HOST: spanner:9010
command: spanner-cli -p local-project -i test-instance -d local-database
depends_on:
- spanner-init