Skip to content

tk42/goose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goose

A handly Docker image of goose.

Usage (postgres)

  1. Store sql schema files in ./schema
  2. Save .env file
    GOOSE_DRIVER=postgres
    GOOSE_DBSTRING="postgres://user:password@qwerty.us-east-1.redshift.amazonaws.com:5439/db"
  3. To goose up, write docker-compose.yml as following
    version: '3'
    services:
      migration:
      image: ghcr.io/tk42/goose:latest
      platform: linux/amd64 # If you use M1 Mac
      env_file:
        - .env
      working_dir: "/src"
      volumes:
        - "./schema:/src"
      command: "up"
      depends_on:
        - postgres
    
    postgres:
      image: postgres:latest
      env_file:
        - .env
      ports:
        - 5432:5432
      volumes:
        - postgres_data:/var/lib/postgresql/data/
    
    volumes:
      postgres_data:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages