[기록] docker-compose가 여러개 있을 때 쉘 스크립트 작성

2024. 3. 30. 16:40Server

[기록] docker-compose가 여러개 있을 때 쉘 스크립트 작성

 

 

 

# startup.sh

#!/bin/sh

docker-compose -f docker-compose-yourdockercompose.yml up -d
(docker-compose -f docker-compose-yourdockercompose.yml logs -f >> /home/ubuntu/app/app.log) &

exit

 

 

 

# shutdown.sh

#!/bin/sh

docker-compose -f docker-compose-yourdockercompose.yml down

exit