diff --git a/grav/docker-compose.yaml b/grav/docker-compose.yaml index e22f1e5..cf802de 100644 --- a/grav/docker-compose.yaml +++ b/grav/docker-compose.yaml @@ -2,8 +2,6 @@ version: '3.8' services: grav-init: - depends_on: - - grav build: context: ./init-grav dockerfile: Dockerfile @@ -12,6 +10,8 @@ services: - grav_data:/var/www/html grav: + depends_on: + - grav-init build: . container_name: grav_cms ports: diff --git a/grav/init-grav/copy-theme.sh b/grav/init-grav/copy-theme.sh index b87d3d1..160d962 100644 --- a/grav/init-grav/copy-theme.sh +++ b/grav/init-grav/copy-theme.sh @@ -3,18 +3,7 @@ THEMES_DIR=/var/www/html/user/themes -# Function to check if Grav is ready -is_grav_ready() { - [ -d /var/www/html ] -} - -# Wait for Grav to be ready -while ! is_grav_ready; do - echo "Waiting for Grav to be ready..." - sleep 10 -done - -echo "Grav is ready. Copying theme..." +echo " Copying theme..." # Create the themes directory if it does not exist [ ! -d "$THEMES_DIR" ] && mkdir -p "$THEMES_DIR"