Skip to content

Commit

Permalink
make backward compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMKuehne committed Dec 13, 2023
1 parent f231ef0 commit cdf8723
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dev-tools/check_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ dockerchecker(){
mapfile -t DOCKER_COMPS < <(find . -maxdepth 1 -type d -name migrations -prune -false -o -iname "docker-compose*.yml")
for DOCKER_COMP in "${DOCKER_COMPS[@]}"; do
echo -e "\\n""${GREEN}""Run docker check on ${DOCKER_COMP}:""${NC}""\\n"
if docker compose -f "${DOCKER_COMP}" config 1>/dev/null || [[ $? -ne 1 ]]; then # TODO check
if docker-compose -f "${DOCKER_COMP}" config 1>/dev/null || [[ $? -ne 1 ]]; then # TODO check
echo -e "${GREEN}""${BOLD}""==> SUCCESS""${NC}""\\n"
else
echo -e "\\n""${ORANGE}${BOLD}==> FIX ERRORS""${NC}""\\n"
Expand Down
4 changes: 2 additions & 2 deletions helper/helper_embark_general.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ check_db() {
HOST_ENV=$(grep DATABASE_HOST ./.env | sed 's/DATABASE\_HOST\=//')
echo -e "\\n${ORANGE}""${BOLD}""checking database""${NC}\\n""${BOLD}=================================================================${NC}"
echo -e "${BLUE}""${BOLD}""1. checking startup""${NC}\\n"
if docker compose -f ./docker-compose.yml up -d ; then
if docker-compose -f ./docker-compose.yml up -d ; then
echo -e "${GREEN}""${BOLD}""Finished setup mysql and redis docker images""${NC}"
add_to_env_history "${PW_ENV}" "$(docker compose ps -q embark_db)"
add_to_env_history "${PW_ENV}" "$(docker-compose ps -q embark_db)"
else
echo -e "${ORANGE}""${BOLD}""Failed setup mysql and redis docker images""${NC}"
exit 1
Expand Down
16 changes: 10 additions & 6 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ install_debs(){
apt-get update -y
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
fi
# alias for compose to stay backwards comp
if docker --help | grep -q compose; then
alias docker-compose="docker compose"
fi
# python3-dev
if ! dpkg -l python3.10-dev &>/dev/null; then
apt-get install -y python3.10-dev || apt-get install -y -q python3-dev
Expand Down Expand Up @@ -362,13 +366,13 @@ install_embark_default(){
fi

# download images for container
docker compose pull
docker compose up -d
docker-compose pull
docker-compose up -d

# activate daemon
systemctl start embark.service
check_db
docker compose stop
docker-compose stop
echo -e "${GREEN}""${BOLD}""Ready to use \$sudo ./run-server.sh ""${NC}"
echo -e "${GREEN}""${BOLD}""Which starts the server on (0.0.0.0) port 80 ""${NC}"
}
Expand Down Expand Up @@ -438,11 +442,11 @@ install_embark_dev(){
chmod 644 .env

# download images for container
docker compose pull
docker compose up -d
docker-compose pull
docker-compose up -d

check_db
docker compose stop
docker-compose stop
echo -e "${GREEN}""${BOLD}""Ready to use \$sudo ./dev-tools/debug-server-start.sh""${NC}"
echo -e "${GREEN}""${BOLD}""Or use otherwise""${NC}"
}
Expand Down

0 comments on commit cdf8723

Please sign in to comment.