Skip to content

wiztools/docker-dbmigrate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

About

This docker image bundles the Go migrate DB migration tool. Extending from this image, you can create one time run containers for running DB migrations for your project.

How to use

Simple Dockerfile for using this image:

FROM wiztools/dbmigrate:3.0.1

COPY db/migrations/*.sql /app/db/migrations/

The version of the image is same as the release version of the migrate tool.

When running the container, you need to pass:

  1. DB URL dburl as environment variable.
  2. The migrate command like up / down as parameter. When no parameter is given, by default up command is used.

Example:

$ docker build -t migrate .
$ docker run -e dburl='mysql://root@tcp(localhost:3306)/test' migrate up

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages