Skip to content

Commit

Permalink
Add docker-compose file to spin up databases under Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Aug 12, 2021
1 parent e75f547 commit 435fd45
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# shellcheck shell=bash
export MYSQL_HOST=127.0.0.1
export MYSQL_PORT=3307

export POSTGRES_HOST=localhost
export POSTGRES_PORT=5433
export POSTGRES_USER=postgres
export POSTGRES_PASSWORD=postgres

export MONGODB_HOST=localhost
export MONGODB_PORT=27018
2 changes: 1 addition & 1 deletion Brewfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
brew 'mongodb/brew/[email protected]', restart_service: true
# brew 'mongodb/brew/[email protected]', restart_service: true
brew '[email protected]', restart_service: true
brew 'postgresql', restart_service: true
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
version: '2.1'
services:
mysql:
image: mysql:5.7
environment:
- MYSQL_DATABASE=will_paginate
- MYSQL_ALLOW_EMPTY_PASSWORD=true
ports:
- 3307:3306
postgres:
image: postgres:11
environment:
- POSTGRES_DB=will_paginate
- POSTGRES_PASSWORD=postgres
ports:
- 5433:5432
mongodb:
image: mongo:4.2
ports:
- 27018:27017

0 comments on commit 435fd45

Please sign in to comment.