39 lines
514 B
Bash
39 lines
514 B
Bash
#!/usr/bin/env bash
|
|
|
|
up() {
|
|
docker-compose --compatibility up -d
|
|
}
|
|
|
|
update() {
|
|
docker-compose pull
|
|
up
|
|
}
|
|
|
|
run() {
|
|
if [[ $1 == "up" ]]; then
|
|
up
|
|
elif [[ $1 == "update" ]]; then
|
|
update
|
|
else
|
|
echo "not run's command ,try to use docker-compose "
|
|
docker-compose --compatibility "$@"
|
|
fi
|
|
|
|
}
|
|
|
|
main() {
|
|
if [ -f "env.sh" ]; then
|
|
chmod +x env.sh
|
|
. env.sh
|
|
fi
|
|
|
|
cd $1 || echo 'error module $1'
|
|
if [ -f "env.sh" ]; then
|
|
chmod +x env.sh
|
|
. env.sh
|
|
fi
|
|
run "${@:2}"
|
|
}
|
|
|
|
main "$@"
|