Skip to content

Commit

Permalink
TT-10430: add docker-compose setup (#29)
Browse files Browse the repository at this point in the history
Change adds docker-compose setup with mserv and mongodb.
  • Loading branch information
mitjaziv authored Nov 12, 2023
1 parent e06d6ec commit fadb378
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,11 @@ $(binary_name): tmp/.linted.sentinel
mservctl/mservctl: tmp/.linted.sentinel
> cd mservctl
> go build -mod=vendor

# Start runs development environment with mserv and mongo in docker-compose
start:
> docker-compose up -d

# Stop runs development environment with mserv and mongo in docker-compose
stop:
> docker-compose stop
33 changes: 33 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
version: '3.8'

services:
mongodb:
image: mongo:4.0
restart: always
environment:
- AUTH=no
volumes:
- mongo-data:/data/db
ports:
- "27017:27017"
networks:
- tyk

mserv:
build: .
restart: always
volumes:
- ./mserv_example.conf:/etc/mserv/mserv.json
depends_on:
- mongodb
ports:
- "8989:8989"
networks:
- tyk

volumes:
mongo-data:

networks:
tyk:
2 changes: 1 addition & 1 deletion mserv_example.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"MongoStore": {
"default": {
"ConnStr": "mongodb://localhost:27017/admin",
"ConnStr": "mongodb://mongodb:27017/admin",
"UseTLS": false,
"Crypto": {
"Enabled": false,
Expand Down

0 comments on commit fadb378

Please sign in to comment.