-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/Docker Compose for a quick database spin-up (#113)
Adding docker-compose for db creation
- Loading branch information
Showing
21 changed files
with
236 additions
and
9 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
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
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,4 @@ | ||
DB_HOST=localhost | ||
DB_PORT=27017 | ||
DB_USERNAME=melkey | ||
DB_ROOT_PASSWORD=password1234 |
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,3 +1,4 @@ | ||
DB_HOST= | ||
DB_PORT= | ||
DB_DATABASE= | ||
DB_USERNAME= | ||
DB_ROOT_PASSWORD= |
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,6 @@ | ||
DB_HOST=localhost | ||
DB_PORT=3306 | ||
DB_DATABASE=blueprint | ||
DB_USERNAME=melkey | ||
DB_PASSWORD=password1234 | ||
DB_ROOT_PASSWORD=password4321 |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ DB_HOST= | |
DB_PORT= | ||
DB_DATABASE= | ||
DB_USERNAME= | ||
DB_PASSWORD= | ||
DB_PASSWORD= | ||
DB_ROOT_PASSWORD= |
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,5 @@ | ||
DB_HOST=localhost | ||
DB_PORT=5432 | ||
DB_DATABASE=blueprint | ||
DB_USERNAME=melkey | ||
DB_PASSWORD=password1234 |
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 @@ | ||
DB_URL=./test.db |
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
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
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
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
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,15 @@ | ||
version: '3.8' | ||
|
||
services: | ||
mongo: | ||
image: mongo:latest | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: ${DB_USERNAME} | ||
MONGO_INITDB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} | ||
ports: | ||
- "${DB_PORT}:27017" | ||
volumes: | ||
- mongo_volume:/data/db | ||
|
||
volumes: | ||
mongo_volume: |
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,17 @@ | ||
version: '3.8' | ||
|
||
services: | ||
mysql: | ||
image: mysql:latest | ||
environment: | ||
MYSQL_DATABASE: ${DB_DATABASE} | ||
MYSQL_USER: ${DB_USERNAME} | ||
MYSQL_PASSWORD: ${DB_PASSWORD} | ||
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} | ||
ports: | ||
- "${DB_PORT}:3306" | ||
volumes: | ||
- mysql_volume:/var/lib/mysql | ||
|
||
volumes: | ||
mysql_volume: |
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,16 @@ | ||
version: '3.8' | ||
|
||
services: | ||
psql: | ||
image: postgres:latest | ||
environment: | ||
POSTGRES_DB: ${DB_DATABASE} | ||
POSTGRES_USER: ${DB_USERNAME} | ||
POSTGRES_PASSWORD: ${DB_PASSWORD} | ||
ports: | ||
- "${DB_PORT}:5432" | ||
volumes: | ||
- psql_volume:/var/lib/postgresql/data | ||
|
||
volumes: | ||
psql_volume: |
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,14 @@ | ||
package docker | ||
|
||
import ( | ||
_ "embed" | ||
) | ||
|
||
type MongoDockerTemplate struct{} | ||
|
||
//go:embed files/docker-compose/mongo.tmpl | ||
var mongoDockerTemplate []byte | ||
|
||
func (m MongoDockerTemplate) Docker() []byte { | ||
return mongoDockerTemplate | ||
} |
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,14 @@ | ||
package docker | ||
|
||
import ( | ||
_ "embed" | ||
) | ||
|
||
type MysqlDockerTemplate struct{} | ||
|
||
//go:embed files/docker-compose/mysql.tmpl | ||
var mysqlDockerTemplate []byte | ||
|
||
func (m MysqlDockerTemplate) Docker() []byte { | ||
return mysqlDockerTemplate | ||
} |
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,14 @@ | ||
package docker | ||
|
||
import ( | ||
_ "embed" | ||
) | ||
|
||
type PostgresDockerTemplate struct{} | ||
|
||
//go:embed files/docker-compose/postgres.tmpl | ||
var postgresDockerTemplate []byte | ||
|
||
func (m PostgresDockerTemplate) Docker() []byte { | ||
return postgresDockerTemplate | ||
} |
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
Oops, something went wrong.