Docker: migrate from bind mounts to named volumes
This commit is contained in:
parent
8b39e5912b
commit
37366f5652
18 changed files with 143 additions and 62 deletions
|
@ -1,3 +1,6 @@
|
|||
[volumes]
|
||||
data = {}
|
||||
|
||||
[services.postgres]
|
||||
container_name = "postgres"
|
||||
image = "postgres:16"
|
||||
|
@ -5,7 +8,7 @@ environment = ["TZ=Europe/Helsinki"]
|
|||
ports = ["127.0.0.1:5432:5432"]
|
||||
networks = ["postgres"]
|
||||
volumes = [
|
||||
"/docker/postgres:/var/lib/postgresql/data",
|
||||
"data:/var/lib/postgresql/data",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
]
|
||||
restart = "unless-stopped"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue