Skip to content

Commit 05034ae

Browse files
committed
Feat : docker compose 수정
1 parent 8cd6e3b commit 05034ae

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docker-compose.common.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ services:
33
image: tinybite-server:latest
44
container_name: tinybite-api
55
restart: always
6-
network_mode: host
7-
ports:
8-
- "8080:8080"
6+
extra_hosts:
7+
- "host.docker.internal:host-gateway" # MySQL(호스트) 접근용
8+
networks:
9+
- tinybite-net
910
env_file:
1011
- .env
1112
depends_on:
@@ -23,13 +24,17 @@ services:
2324
- /home/ubuntu/tinybite/data/certbot/conf:/etc/letsencrypt
2425
- /home/ubuntu/tinybite/data/certbot/www:/var/www/certbot
2526
restart: always
27+
networks:
28+
- tinybite-net
2629
depends_on:
2730
- tinybite-api
2831

2932
redis:
3033
container_name: redis
3134
image: redis:7.2.4
3235
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
36+
networks:
37+
- tinybite-net
3338
env_file:
3439
- .env
3540
volumes:
@@ -51,3 +56,7 @@ services:
5156

5257
volumes:
5358
redis_data:
59+
60+
networks:
61+
tinybite-net:
62+
driver: bridge

0 commit comments

Comments
 (0)