How can I structure my docker projects for easy deployment?

后端 未结 2 607
暗喜
暗喜 2021-01-06 06:58

Right now I have multiple components of my application in the same folder linked together with a docker-compose

This works really well in development, but when I wa

2条回答
  •  庸人自扰
    2021-01-06 07:28

    I have two parts: source code and config files (docker files, docker-compose files...)

    I put Dockerfile and docker-compose in a folder with the struct like you and push it to a git repository. For source code (and other data), I have to manage it by hand, with separated git repositories for source code to push and pull each time it needs to update.

    Be careful with the production server, just update small part instead of the whole server.

提交回复
热议问题