Skip to content

Commit

Permalink
📝docs : docker-compose 명령어 수정
Browse files Browse the repository at this point in the history
📝docs : docker-compose 명령어 수정
  • Loading branch information
DDonghyeo authored May 23, 2024
2 parents 99986d5 + f196bff commit 3a27cd3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
6 changes: 3 additions & 3 deletions script/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi
# Config 검색
if [ -z "$RUNNING_CONFIG" ]; then
echo "Starting Config Service ..."
docker compose -f /home/docker-compose.yml up -d config
docker-compose -f /home/docker-compose.yml up -d config
sleep 5 #Config 실행 5초 대기
else
echo "Config Service is already running"
Expand All @@ -25,15 +25,15 @@ fi
# Zookeeper 검색
if [ -z "$RUNNING_ZOOKEEPER" ]; then
echo "Starting Zookeeper ..."
docker compose -f /home/docker-compose.yml up -d zookeeper
docker-compose -f /home/docker-compose.yml up -d zookeeper
else
echo "Zookeeper is already running"
fi

# Kafka 검색
if [ -z "$RUNNING_ZOOKEEPER" ]; then
echo "Starting Kafka ..."
docker compose -f /home/docker-compose.yml up -d kafka
docker-compose -f /home/docker-compose.yml up -d kafka
else
echo "Kafka is already running"
fi
8 changes: 4 additions & 4 deletions script/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
# -d : detached 모드. 컨테이너를 백그라운드에서 실행

echo "api-gateway server start..."
docker compose -f /home/docker-compose.yml up -d api-gateway
docker-compose -f /home/docker-compose.yml up -d api-gateway
echo "noti-service server start..."
docker compose -f /home/docker-compose.yml up -d noti-service
docker-compose -f /home/docker-compose.yml up -d noti-service
echo "user-service server start..."
docker compose -f /home/docker-compose.yml up -d user-service
docker-compose -f /home/docker-compose.yml up -d user-service
echo "weather-service server start..."
docker compose -f /home/docker-compose.yml up -d weather-service
docker-compose -f /home/docker-compose.yml up -d weather-service
10 changes: 4 additions & 6 deletions script/docker_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ fi

# Docker-compose install
# Docker-compose 설치
if ! command -v docker compose &> /dev/null; then
if ! command -v docker-compose &> /dev/null; then
echo "Docker-compose is not installed..."
echo "Docker-compose install start..."

#Docker compose plugin 설치 - Amazon Linux 2023
sudo mkdir -p /usr/local/lib/docker/cli-plugins/
sudo curl -SL "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/lib/docker/cli-plugins/docker-compose
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose

docker compose version
sudo curl -L "https://github.com/docker/compose/releases/download/1.28.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

echo "Docker-compose install complete!"
else
Expand Down

0 comments on commit 3a27cd3

Please sign in to comment.