seaweedfs/docker/Makefile

65 lines
2.3 KiB
Makefile
Raw Normal View History

2020-02-26 13:56:15 +08:00
all: gen
.PHONY : gen
2020-02-27 08:46:29 +08:00
gen: dev
2021-03-12 18:54:08 +08:00
binary:
2021-05-01 15:20:11 +08:00
export SWCOMMIT=$(shell git rev-parse --short HEAD)
export SWLDFLAGS="-X github.com/chrislusf/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)"
cd ../weed; CGO_ENABLED=0 GOOS=linux go build -ldflags "-extldflags -static $(SWLDFLAGS)"; mv weed ../docker/
2021-03-12 18:54:08 +08:00
build: binary
2020-03-02 10:23:07 +08:00
docker build --no-cache -t chrislusf/seaweedfs:local -f Dockerfile.local .
2020-02-27 08:46:29 +08:00
rm ./weed
s3tests_build:
docker build --no-cache -t chrislusf/ceph-s3-tests:local -f Dockerfile.s3tests .
2020-02-27 08:46:29 +08:00
dev: build
2021-02-04 05:09:28 +08:00
docker-compose -f compose/local-dev-compose.yml -p seaweedfs up
2020-02-27 08:46:29 +08:00
2021-03-09 00:39:44 +08:00
dev_tls: build certstrap
ENV_FILE="tls.env" docker-compose -f compose/local-dev-compose.yml -p seaweedfs up
2021-01-23 14:47:23 +08:00
dev_mount: build
2021-02-04 05:09:28 +08:00
docker-compose -f compose/local-mount-compose.yml -p seaweedfs up
2021-01-23 14:47:23 +08:00
2021-03-12 18:54:08 +08:00
profile_mount: build
docker-compose -f compose/local-mount-profile-compose.yml -p seaweedfs up
2020-12-21 23:58:41 +08:00
k8s: build
2021-02-04 05:09:28 +08:00
docker-compose -f compose/local-k8s-compose.yml -p seaweedfs up
2020-12-21 23:58:41 +08:00
2020-11-11 18:02:30 +08:00
dev_registry: build
2021-02-04 05:09:28 +08:00
docker-compose -f compose/local-registry-compose.yml -p seaweedfs up
2020-11-11 18:02:30 +08:00
2021-01-27 01:50:25 +08:00
dev_replicate: build
2021-02-04 05:09:28 +08:00
docker-compose -f compose/local-replicate-compose.yml -p seaweedfs up
2021-01-27 01:50:25 +08:00
2020-02-27 08:46:29 +08:00
cluster: build
2021-02-04 05:09:28 +08:00
docker-compose -f compose/local-cluster-compose.yml -p seaweedfs up
2020-02-27 08:46:29 +08:00
2021-01-24 16:00:42 +08:00
2clusters: build
2021-02-04 05:09:28 +08:00
docker-compose -f compose/local-clusters-compose.yml -p seaweedfs up
2021-01-24 16:00:42 +08:00
s3tests: build s3tests_build
docker-compose -f compose/local-s3tests-compose.yml -p seaweedfs up
filer_etcd: build
2021-02-04 05:09:28 +08:00
docker stack deploy -c compose/swarm-etcd.yml fs
2020-02-27 08:46:29 +08:00
clean:
2020-02-26 13:56:15 +08:00
rm ./weed
2021-03-09 00:39:44 +08:00
certstrap:
go get github.com/square/certstrap
certstrap --depot-path compose/tls init --passphrase "" --common-name "SeaweedFS CA" || true
2021-03-10 17:02:13 +08:00
certstrap --depot-path compose/tls request-cert --passphrase "" --common-name volume01.dev || true
certstrap --depot-path compose/tls request-cert --passphrase "" --common-name master01.dev || true
certstrap --depot-path compose/tls request-cert --passphrase "" --common-name filer01.dev || true
certstrap --depot-path compose/tls request-cert --passphrase "" --common-name client01.dev || true
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" volume01.dev || true
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" master01.dev || true
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" filer01.dev || true
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" client01.dev || true