https://github.com/byrnedo/prefab
Simple Go testing tool for making disposable containers with Docker for Mysql, Mongo, Nats or roll your own
https://github.com/byrnedo/prefab
docker ftp go mongo mysql nats nats-streaming postgres sftp testing testing-tools
Last synced: 3 months ago
JSON representation
Simple Go testing tool for making disposable containers with Docker for Mysql, Mongo, Nats or roll your own
- Host: GitHub
- URL: https://github.com/byrnedo/prefab
- Owner: byrnedo
- License: mit
- Created: 2016-05-05T14:18:36.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-04T09:26:21.000Z (almost 9 years ago)
- Last Synced: 2026-01-02T07:21:36.941Z (6 months ago)
- Topics: docker, ftp, go, mongo, mysql, nats, nats-streaming, postgres, sftp, testing, testing-tools
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prefab
Quickly run docker containers for infrastructure when testing.
```
import "github.com/byrnedo/prefab"
// create and run a mysql container for this session
id, url := prefab.StartMysqlContainer()
// helper to wait for port to open
if err := prefab.WaitForMysql(url, 20 * time.Second); err != nil {
panic(err)
}
// Connect using url :D
prefab.Remove(id)
```
Supports:
- Mysql
- Postgresql
- Mongo
- Nats
Although it's easy to roll your own.
Pull requests for new containers very welcome :)