"make localstack" target, link to docs/contributing (#1522)

This commit is contained in:
mmetc 2022-05-17 15:54:52 +02:00 committed by GitHub
parent fae1f96856
commit b8547da4c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 2 deletions

3
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,3 @@
Please refer to [Contributing to CrowdSec](https://doc.crowdsec.net/docs/next/contributing/getting_started).

View file

@ -166,11 +166,19 @@ dummy-plugin_static:goversion
testclean: bats-clean testclean: bats-clean
@$(RM) pkg/apiserver/ent $(WIN_IGNORE_ERR) @$(RM) pkg/apiserver/ent $(WIN_IGNORE_ERR)
@$(RM) pkg/cwhub/hubdir $(WIN_IGNORE_ERR) @$(RM) pkg/cwhub/hubdir $(WIN_IGNORE_ERR)
@$(RM) pkg/cwhub/install $(WIN_IGNORE_ERR)
@$(RM) pkg/types/example.txt $(WIN_IGNORE_ERR)
.PHONY: test .PHONY: test
test: export AWS_ENDPOINT_FORCE=http://localhost:4566
test: goversion test: goversion
@echo NOTE: You need Docker, docker-compose and run \"make localstack\" in a separate shell
$(GOTEST) $(LD_OPTS) ./... $(GOTEST) $(LD_OPTS) ./...
.PHONY: localstack
localstack:
docker-compose -f tests/localstack/docker-compose.yml up
package-common: package-common:
@echo "Building Release to dir $(RELDIR)" @echo "Building Release to dir $(RELDIR)"
@$(MKDIR) $(RELDIR)/cmd/crowdsec @$(MKDIR) $(RELDIR)/cmd/crowdsec

View file

@ -1 +0,0 @@
see doc in `doc/`

View file

@ -0,0 +1,32 @@
version: "3.8"
services:
localstack:
container_name: localstack_main
image: localstack/localstack
network_mode: bridge
ports:
- "127.0.0.1:53:53" # only required for Pro (DNS)
- "127.0.0.1:53:53/udp" # only required for Pro (DNS)
- "127.0.0.1:443:443" # only required for Pro (LocalStack HTTPS Edge Proxy)
- "127.0.0.1:4510-4559:4510-4559" # external service port range
- "127.0.0.1:4566:4566" # LocalStack Edge Proxy
environment:
AWS_HOST: localstack
SERVICES: "cloudwatch,logs,kinesis"
DEBUG: ""
DATA_DIR: ""
LAMBDA_EXECUTOR: ""
KINESYS_ERROR_PROBABILITY: ""
DOCKER_HOST: "unix://var/run/docker.sock"
HOST_TMP_FOLDER: "/tmp"
KINESIS_INITIALIZE_STREAMS: "stream-1-shard:1,stream-2-shards:2"
HOSTNAME_EXTERNAL: "localstack"
AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE"
AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
AWS_REGION: "us-east-1"
AWS_ENDPOINT_FORCE: "http://localhost:4566"
volumes:
- "${TMPDIR:-/tmp}/localstack:/tmp/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"