Skip to content

Commit

Permalink
chore: create docker-compose for the simple example
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsimonemms committed Dec 12, 2022
1 parent 451a69e commit 6c6fae5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/simple/README.md
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>
```
22 changes: 22 additions & 0 deletions examples/simple/docker-compose.yml
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

0 comments on commit 6c6fae5

Please sign in to comment.