-
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.
chore: create docker-compose for the simple example
- Loading branch information
1 parent
451a69e
commit 6c6fae5
Showing
2 changed files
with
34 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Simple Example | ||
|
||
The simple example exists to show how Gobblr works. | ||
|
||
- `data`: the data that will be ingested to the database. | ||
- `migrations`: a [GORM migration](https://gorm.io/docs/migration.html) script to build the SQL databases - this will be handled by your database library (which may or may not be GORM). | ||
|
||
You can use [Docker Compose](https://docs.docker.com/compose) to run the example stack: | ||
|
||
```shell | ||
docker-compose run --rm --service-ports gobblr-<db-type> | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
services: | ||
## MongoDB | ||
gobblr-mongodb: &gobblr | ||
build: | ||
context: ../.. | ||
ports: | ||
- 3000:5670 | ||
environment: | ||
GOBBLR_CONNECTION_URI: mongodb://mongodb:27017/gobblr | ||
GOBBLR_DATABASE: gobblr | ||
GOBBLR_PATH: /data | ||
links: | ||
- mongodb | ||
volumes: | ||
- ./data:/data | ||
restart: on-failure | ||
command: db mongodb --run | ||
|
||
mongodb: | ||
image: library/mongo | ||
ports: | ||
- 4000:27017 |