Skip to content

Commit 0c8bf36

Browse files
committed
fix: 마운트 포인트 수정
1 parent 3106b87 commit 0c8bf36

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

terraform/dev/locals.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ locals {
102102
}
103103
])
104104
mountPoints = [
105-
for vol in lookup(def, "volumes", []) :{
106-
sourceVolume = vol.name, containerPath = lookup(var.volume_mount_paths, vol.name, "/logs"),
107-
readOnly = false
105+
for vol in lookup(def, "volumes", []) : {
106+
sourceVolume = vol.name
107+
containerPath = vol.containerPath
108+
readOnly = vol.readOnly
108109
}
109110
]
110111
}

terraform/dev/terraform.tfvars

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ ecs_task_definitions_base = {
2929
environment = {}
3030
volumes = [
3131
{
32-
name = "dev-api-volume"
33-
host_path = "/home/ec2-user/logs/"
32+
name = "dev-api-volume"
33+
host_path = "/home/ec2-user/logs/"
34+
containerPath = "/logs"
35+
readOnly = false
3436
}
3537
]
3638
}
@@ -63,8 +65,10 @@ ecs_task_definitions_base = {
6365
]
6466
volumes = [
6567
{
66-
name = "dev-mysql-volume"
67-
host_path = "/home/ec2-user/mysql/"
68+
name = "dev-mysql-volume"
69+
host_path = "/home/ec2-user/mysql/"
70+
containerPath = "/var/lib/mysql"
71+
readOnly = false
6872
}
6973
]
7074
}
@@ -106,16 +110,22 @@ ecs_task_definitions_base = {
106110

107111
volumes = [
108112
{
109-
name = "docker_sock"
110-
host_path = "/var/run/docker.sock"
113+
name = "docker_sock"
114+
host_path = "/var/run/docker.sock"
115+
containerPath = "/var/run/docker.sock"
116+
readOnly = true
111117
},
112118
{
113-
name = "proc"
114-
host_path = "/proc/"
119+
name = "proc"
120+
host_path = "/proc/"
121+
containerPath = "/host/proc"
122+
readOnly = true
115123
},
116124
{
117-
name = "cgroup"
118-
host_path = "/sys/fs/cgroup/"
125+
name = "cgroup"
126+
host_path = "/sys/fs/cgroup/"
127+
containerPath = "/host/sys/fs/cgroup"
128+
readOnly = true
119129
}
120130
]
121131
}

0 commit comments

Comments
 (0)