"make localstack" target, link to docs/contributing (#1522)
This commit is contained in:
parent
fae1f96856
commit
b8547da4c3
4 changed files with 44 additions and 2 deletions
3
CONTRIBUTING.md
Normal file
3
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
Please refer to [Contributing to CrowdSec](https://doc.crowdsec.net/docs/next/contributing/getting_started).
|
||||
|
8
Makefile
8
Makefile
|
@ -166,11 +166,19 @@ dummy-plugin_static:goversion
|
|||
testclean: bats-clean
|
||||
@$(RM) pkg/apiserver/ent $(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
|
||||
test: export AWS_ENDPOINT_FORCE=http://localhost:4566
|
||||
test: goversion
|
||||
@echo NOTE: You need Docker, docker-compose and run \"make localstack\" in a separate shell
|
||||
$(GOTEST) $(LD_OPTS) ./...
|
||||
|
||||
.PHONY: localstack
|
||||
localstack:
|
||||
docker-compose -f tests/localstack/docker-compose.yml up
|
||||
|
||||
package-common:
|
||||
@echo "Building Release to dir $(RELDIR)"
|
||||
@$(MKDIR) $(RELDIR)/cmd/crowdsec
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
see doc in `doc/`
|
32
tests/localstack/docker-compose.yml
Normal file
32
tests/localstack/docker-compose.yml
Normal 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"
|
Loading…
Reference in a new issue