From bc0ad98615299775405a193dd8fc0c132ffac416 Mon Sep 17 00:00:00 2001 From: Ryan Sawyer <67876161+RyanSawyer6003@users.noreply.github.com> Date: Mon, 4 May 2026 10:01:35 -0500 Subject: [PATCH 1/2] Update docker-compose.yml Added health checks and moved volumes to named locations to prevent issues if ./itflow dir did not exist. --- docker-compose.yml | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 68de50a..422bb93 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,39 +3,38 @@ networks: wan: name: wan driver: bridge - itflow-db: name: itflow-db external: false ########################### VOLUMES - volumes: itflow-db: - + itflow_data: + ########################### ITFLOW services: itflow: platform: linux/amd64 hostname: itflow container_name: itflow - # Comment out image for DockerHub image, use build for local DockerFile if you prefer to build from base - image: itfloworg/itflow:latest - #build: - #context: . - #dockerfile: Dockerfile +# image: itfloworg/itflow:latest + build: + context: . + dockerfile: Dockerfile restart: unless-stopped - depends_on: - - itflow-db + depends_on: + itflow-db: + condition: service_healthy # ← waits for DB to be ready, not just started networks: - wan - itflow-db ports: - - "80:8080" + - "8080:8080" environment: - TZ=$TZ - ITFLOW_NAME=ITFlow - - ITFLOW_URL=it.$ROOT_DOMAIN + - ITFLOW_URL=$ROOT_DOMAIN - ITFLOW_PORT=8080 - ITFLOW_REPO=github.com/itflow-org/itflow - ITFLOW_REPO_BRANCH=master @@ -43,13 +42,19 @@ services: - ITFLOW_DB_HOST=itflow-db - ITFLOW_DB_PASS=$ITFLOW_DB_PASS volumes: - - ./itflow/:/var/www/localhost/htdocs + - itflow_data:/var/www/localhost/htdocs + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s - itflow-db: + itflow-db: # ← duplicate removed hostname: itflow-db container_name: itflow-db image: mariadb:10.11.6 - restart: always + restart: unless-stopped # ← consistent with app networks: - itflow-db environment: @@ -58,4 +63,10 @@ services: - MARIADB_USER=itflow - MARIADB_PASSWORD=$ITFLOW_DB_PASS volumes: - - itflow-db:/var/lib/mysql/ + - itflow-db:/var/lib/mysql/ # ← removed broken itflow_data entry + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s From adb0f572113b11d6d3232439f51556cb1feca486 Mon Sep 17 00:00:00 2001 From: Ryan Sawyer <67876161+RyanSawyer6003@users.noreply.github.com> Date: Mon, 4 May 2026 10:04:50 -0500 Subject: [PATCH 2/2] Update docker-compose.yml Added Comment for instructions on pulling image from dockerhub --- docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 422bb93..efab569 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,7 @@ services: platform: linux/amd64 hostname: itflow container_name: itflow + #Uncomment image to use built image from dockerhub, be sure to comment out build: context: and dockerfile: # image: itfloworg/itflow:latest build: context: . @@ -50,7 +51,7 @@ services: retries: 3 start_period: 40s - itflow-db: # ← duplicate removed + itflow-db: hostname: itflow-db container_name: itflow-db image: mariadb:10.11.6 @@ -63,7 +64,7 @@ services: - MARIADB_USER=itflow - MARIADB_PASSWORD=$ITFLOW_DB_PASS volumes: - - itflow-db:/var/lib/mysql/ # ← removed broken itflow_data entry + - itflow-db:/var/lib/mysql/ healthcheck: test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] interval: 10s