2019-04-21 04:50
浏览 143


In golang-migrate's documentation, it is stated that you can run this command to run all the migrations in one folder.

docker run -v {{ migration dir }}:/migrations --network host migrate/migrate
    -path=/migrations/ -database postgres://localhost:5432/database up 2

How would you do this to fit the syntax of the new docker-compose, which discourages the use of --network?

And more importantly: How would you connect to a database in another container instead to one running in your localhost?

图片转代码服务由CSDN问答提供 功能建议


  docker run -v {{迁移目录}}:/ migrations-网络主机migration / migrate 
 -path = / migrations /-数据库postgres:// localhost:  5432 /数据库启动2 

您如何执行此操作以适应新的docker-compose的语法,从而不鼓励使用-network < / code>?


  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题