fleet/docker-compose.yml
Tomas Touceda a6cff7ea89
Migrate all mysql tests to the new form (#1408)
* Migrate all mysql tests to the new form

* Only dump sql if MYSQL_TEST is on

* Removing parallel until we get rid of this code

* Move TestMain to an actual _test file

* A little experiment with tmpfs to speed up the db

* Let's make sure the dump.sql file is also in ram
2021-07-19 18:20:31 -03:00

73 lines
1.9 KiB
YAML

---
version: '2'
services:
# To test with MariaDB, set FLEET_MYSQL_IMAGE to mariadb:10.6 or the like.
mysql:
image: ${FLEET_MYSQL_IMAGE:-mysql:5.7}
platform: linux/x86_64
volumes:
- mysql-persistent-volume:/tmp
command: mysqld --datadir=/tmp/mysqldata --event-scheduler=ON
environment: &mysql-default-environment
MYSQL_ROOT_PASSWORD: toor
MYSQL_DATABASE: fleet
MYSQL_USER: fleet
MYSQL_PASSWORD: insecure
ports:
- "3306:3306"
mysql_test:
image: ${FLEET_MYSQL_IMAGE:-mysql:5.7}
platform: linux/x86_64
# innodb-file-per-table=OFF gives ~20% speedup for test runs.
command: mysqld --datadir=/tmpfs --slow_query_log=1 --log_output=TABLE --log-queries-not-using-indexes --event-scheduler=ON --innodb-file-per-table=OFF
environment: *mysql-default-environment
ports:
- "3307:3306"
tmpfs:
- /var/lib/mysql:rw,noexec,nosuid
- /tmpfs
mailhog:
image: mailhog/mailhog:latest
ports:
- "8025:8025"
- "1025:1025"
redis:
image: redis:5
ports:
- "6379:6379"
saml_idp:
image: fleetdm/docker-idp:latest
environment:
SIMPLESAMLPHP_SP_ENTITY_ID: 'https://localhost:8080'
SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE: 'https://localhost:8080/api/v1/fleet/sso/callback'
volumes:
- ./tools/saml/users.php:/var/www/simplesamlphp/config/authsources.php
ports:
- "9080:8080"
- "9443:8443"
# CAdvisor container allows monitoring other containers. Useful for
# development.
cadvisor:
image: google/cadvisor:latest
ports:
- "5678:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./tools/app/prometheus.yml:/etc/prometheus/prometheus.yml
volumes:
mysql-persistent-volume: