Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 27 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,59 @@ 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
#Uncomment image to use built image from dockerhub, be sure to comment out build: context: and 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
- ITFLOW_LOG_LEVEL=info
- 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:
hostname: itflow-db
container_name: itflow-db
image: mariadb:10.11.6
restart: always
restart: unless-stopped # ← consistent with app
networks:
- itflow-db
environment:
Expand All @@ -58,4 +64,10 @@ services:
- MARIADB_USER=itflow
- MARIADB_PASSWORD=$ITFLOW_DB_PASS
volumes:
- itflow-db:/var/lib/mysql/
- itflow-db:/var/lib/mysql/
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s