Skip to content

Commit 3516dcb

Browse files
committed
Feat : host 모드로 변경
1 parent 7808b4e commit 3516dcb

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎docker-compose.common.yml‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ services:
33
image: tinybite-server:latest
44
container_name: tinybite-api
55
restart: always
6-
extra_hosts:
7-
- "host.docker.internal:host-gateway" # MySQL(호스트) 접근용
8-
networks:
9-
- tinybite-net
6+
network_mode: host # VM 네트워크 직접 사용
107
env_file:
118
- .env
129
depends_on:
@@ -32,16 +29,15 @@ services:
3229
redis:
3330
container_name: redis
3431
image: redis:7.2.4
35-
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
36-
networks:
37-
- tinybite-net
32+
command: [ "redis-server", "--requirepass", "${REDIS_PASSWORD}" ]
33+
network_mode: host # redis도 host로
3834
env_file:
3935
- .env
4036
volumes:
4137
- redis_data:/data
4238
restart: always
4339
healthcheck:
44-
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
40+
test: [ "CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping" ]
4541
interval: 10s
4642
timeout: 5s
4743
retries: 5

0 commit comments

Comments
 (0)