Skip to content

Instantly share code, notes, and snippets.

@svpernova09
Last active June 4, 2022 20:12
Show Gist options
  • Save svpernova09/9675f2cdf08265fc27ea726fadd5c137 to your computer and use it in GitHub Desktop.
Save svpernova09/9675f2cdf08265fc27ea726fadd5c137 to your computer and use it in GitHub Desktop.
Wait for MariaDB before Starting Snipe-IT
version: '3'
services:
snipeit_app:
image: snipe/snipe-it:v6.0.2
volumes:
- ./logs:/var/www/html/storage/logs
ports:
- "8000:80"
depends_on:
mariadb:
condition: service_healthy
redis:
condition: service_started
env_file:
- env.docker
mariadb:
image: mariadb:10.6.4-focal
volumes:
- type: volume
source: mariadb-data
target: /var/lib/mysql
volume:
nocopy: true
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
interval: 3s
timeout: 1s
retries: 5
env_file:
- env.docker
redis:
image: redis:6.2.5-buster
ports:
- "6379:6379"
volumes:
- type: volume
source: redis-data
target: /data
volume:
nocopy: true
volumes:
mariadb-data:
redis-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment