-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Heiner León
committed
Sep 21, 2017
1 parent
0784616
commit 01fb730
Showing
1 changed file
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,38 @@ | ||
# Google Cloud Datastore Emulator | ||
# Google Cloud Datastore Emulator | ||
|
||
A [Google Cloud Datastore Emulator](https://cloud.google.com/datastore/docs/tools/datastore-emulator/) container image. The image is meant to be used for creating an standalone emulator for testing. | ||
|
||
- [`171.0` (Dockerfile)](https://github.com/SingularitiesCR/datastore-emulator-docker/blob/171.0/Dockerfile) | ||
|
||
## Custom commands | ||
|
||
This image contains a script named `start-datastore` (included in the PATH). This script is used to initialize the Datastore emulator. | ||
|
||
### Starting an emulator | ||
|
||
By default, the following command is called: | ||
|
||
```sh | ||
start-datastore | ||
``` | ||
|
||
## Creating a Datastore emulator with Docker Compose | ||
|
||
The easiest way to create an emulator with this image is by using [Docker Compose](https://docs.docker.com/compose). The following snippet can be used as a `docker-compose.yml` for a datastore emulator: | ||
|
||
```YAML | ||
version: "2" | ||
|
||
services: | ||
datastore: | ||
image: singularities/datastore | ||
environment: | ||
- DATASTORE_PROJECT_ID=project-test | ||
- DATASTORE_LISTEN_ADDRESS=0.0.0.0:8081 | ||
ports: | ||
- "8081:8081" | ||
``` | ||
### Persistence | ||
The image has a volume mounted at `/opt/data`. To maintain states between restarts, mount a volume at this location. |