2024-08-22 05:46:40 -07:00
|
|
|
# Compose file to spin up a local Snipe-IT for development.
|
|
|
|
|
2021-04-20 21:17:34 -07:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
snipeit:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.alpine
|
|
|
|
container_name: snipeit
|
|
|
|
ports:
|
2024-08-22 05:46:40 -07:00
|
|
|
- "8000:80"
|
2021-04-20 21:17:34 -07:00
|
|
|
depends_on:
|
2024-08-22 05:46:40 -07:00
|
|
|
redis:
|
2024-08-22 06:10:00 -07:00
|
|
|
# The default needs to be stated.
|
|
|
|
condition: service_started
|
2024-08-22 05:46:40 -07:00
|
|
|
mariadb:
|
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
2021-04-20 21:17:34 -07:00
|
|
|
env_file:
|
2024-08-22 05:46:40 -07:00
|
|
|
- .env.dev.docker
|
2021-04-20 21:17:34 -07:00
|
|
|
|
|
|
|
mariadb:
|
2024-08-22 05:46:40 -07:00
|
|
|
image: mariadb:11.5.2
|
2021-04-20 21:17:34 -07:00
|
|
|
volumes:
|
2024-08-22 05:46:40 -07:00
|
|
|
- db:/var/lib/mysql
|
2021-04-20 21:17:34 -07:00
|
|
|
env_file:
|
2024-08-22 05:46:40 -07:00
|
|
|
- .env.dev.docker
|
2022-08-12 10:00:26 -07:00
|
|
|
ports:
|
|
|
|
- "3306:3306"
|
2024-08-22 05:46:40 -07:00
|
|
|
healthcheck:
|
|
|
|
# https://mariadb.com/kb/en/using-healthcheck-sh/#compose-file-example
|
|
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
|
|
|
interval: 5s
|
|
|
|
timeout: 2s
|
|
|
|
retries: 5
|
2021-04-20 21:17:34 -07:00
|
|
|
|
|
|
|
redis:
|
2024-08-22 05:46:40 -07:00
|
|
|
image: redis:7.4.0
|
2021-04-20 21:17:34 -07:00
|
|
|
|
|
|
|
mailhog:
|
2021-10-03 00:42:53 -07:00
|
|
|
image: mailhog/mailhog:v1.0.1
|
2021-04-20 21:17:34 -07:00
|
|
|
ports:
|
2024-08-22 05:46:40 -07:00
|
|
|
# - 1025:1025
|
|
|
|
- "8025:8025"
|
2021-04-20 21:17:34 -07:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
db: {}
|