Skip to content

Commit

Permalink
Merge branch 'main' into pipdev
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMKuehne authored Aug 27, 2024
2 parents b61da2d + 347ba8d commit dd5d6c5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dev-tools/check_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,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
if docker compose -f "${DOCKER_COMP}" config 1>/dev/null || [[ $? -ne 1 ]]; then
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
24 changes: 12 additions & 12 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,14 @@ install_debs(){
if ! command -v gcc > /dev/null ; then
apt-get install -y build-essential
fi
# Docker + docker-compose
# Docker + docker compose
if [[ "${WSL}" -eq 1 ]]; then
echo -e "\n${ORANGE}WARNING: If you are using WSL2, disable docker integration from the docker-desktop daemon!${NC}"
read -p "Fix docker stuff, then continue. Press any key to continue ..." -n1 -s -r
fi
if ! command -v docker > /dev/null || ! command -v docker-compose > /dev/null ; then
if command -v docker-compose > /dev/null ; then
echo -e "\n${ORANGE}""${BOLD}""Old docker-compose version found""${NC}"
elif ! command -v docker > /dev/null || ! command -v docker compose > /dev/null ; then
# Add Docker's official GPG key:
apt-get install -y ca-certificates curl gnupg
install -m 0755 -d /etc/apt/keyrings
Expand All @@ -265,13 +267,11 @@ install_debs(){
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update -y
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
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 ! command -v docker-compose > /dev/null ; then
if docker --help | grep -q compose; then
alias docker-compose="docker compose"
fi
alias docker-compose="docker compose"
fi
# python3-dev
if ! dpkg -l python3.10-dev &>/dev/null; then
Expand Down Expand Up @@ -394,13 +394,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 @@ -473,11 +473,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 dd5d6c5

Please sign in to comment.