mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
Add better support for M1 to docker-compose.yml and add fleet-dev target to Makefile (#6432)
* Add better support for M1 to docker-compose.yml and add fleet-dev target * Amend comment
This commit is contained in:
parent
1ef5cbe587
commit
22382c757c
2 changed files with 16 additions and 8 deletions
5
Makefile
5
Makefile
|
|
@ -113,7 +113,10 @@ help:
|
|||
build: fleet fleetctl
|
||||
|
||||
fleet: .prefix .pre-build .pre-fleet
|
||||
CGO_ENABLED=1 go build -tags full,fts5,netgo -o build/${OUTPUT} -ldflags ${KIT_VERSION} ./cmd/fleet
|
||||
CGO_ENABLED=1 go build -race=${RACE_ENABLED_VAR} -tags full,fts5,netgo -o build/${OUTPUT} -ldflags ${KIT_VERSION} ./cmd/fleet
|
||||
|
||||
fleet-dev: RACE_ENABLED_VAR=true
|
||||
fleet-dev: fleet
|
||||
|
||||
fleetctl: .prefix .pre-build .pre-fleetctl
|
||||
CGO_ENABLED=0 go build -o build/fleetctl -ldflags ${KIT_VERSION} ./cmd/fleetctl
|
||||
|
|
|
|||
|
|
@ -2,21 +2,24 @@
|
|||
version: "2"
|
||||
services:
|
||||
# To test with MariaDB, set FLEET_MYSQL_IMAGE to mariadb:10.6 or the like.
|
||||
# To run in macOS M1, set FLEET_MYSQL_IMAGE=arm64v8/mysql:oracle FLEET_MYSQL_PLATFORM=linux/arm64/v8
|
||||
mysql:
|
||||
image: ${FLEET_MYSQL_IMAGE:-mysql:5.7}
|
||||
platform: linux/x86_64
|
||||
platform: ${FLEET_MYSQL_PLATFORM:-linux/x86_64}
|
||||
volumes:
|
||||
- mysql-persistent-volume:/tmp
|
||||
command: [
|
||||
command:
|
||||
[
|
||||
"mysqld",
|
||||
"--datadir=/tmp/mysqldata",
|
||||
"--event-scheduler=ON",
|
||||
# These 3 keys run MySQL with GTID consistency enforced to avoid issues with production deployments that use it.
|
||||
"--enforce-gtid-consistency=ON",
|
||||
"--log-bin=bin.log",
|
||||
"--server-id=master-01",
|
||||
"--server-id=master-01"
|
||||
]
|
||||
environment: &mysql-default-environment
|
||||
environment:
|
||||
&mysql-default-environment
|
||||
MYSQL_ROOT_PASSWORD: toor
|
||||
MYSQL_DATABASE: fleet
|
||||
MYSQL_USER: fleet
|
||||
|
|
@ -26,9 +29,10 @@ services:
|
|||
|
||||
mysql_test:
|
||||
image: ${FLEET_MYSQL_IMAGE:-mysql:5.7}
|
||||
platform: linux/x86_64
|
||||
platform: ${FLEET_MYSQL_PLATFORM:-linux/x86_64}
|
||||
# innodb-file-per-table=OFF gives ~20% speedup for test runs.
|
||||
command: [
|
||||
command:
|
||||
[
|
||||
"mysqld",
|
||||
"--datadir=/tmpfs",
|
||||
"--slow_query_log=1",
|
||||
|
|
@ -39,7 +43,7 @@ services:
|
|||
# These 3 keys run MySQL with GTID consistency enforced to avoid issues with production deployments that use it.
|
||||
"--enforce-gtid-consistency=ON",
|
||||
"--log-bin=bin.log",
|
||||
"--server-id=master-01",
|
||||
"--server-id=master-01"
|
||||
]
|
||||
environment: *mysql-default-environment
|
||||
ports:
|
||||
|
|
@ -195,6 +199,7 @@ volumes:
|
|||
mysql-persistent-volume:
|
||||
data-minio:
|
||||
|
||||
|
||||
networks:
|
||||
cluster_network:
|
||||
driver: bridge
|
||||
|
|
|
|||
Loading…
Reference in a new issue