mirror of
https://github.com/furyhawk/cloudy.git
synced 2026-07-21 02:05:53 +00:00
feat: add optional CrowdSec Console enrollment configuration
This commit is contained in:
@@ -94,6 +94,30 @@ Cleanup test decision when done:
|
|||||||
docker exec -it $(docker ps --filter label=com.docker.swarm.service.name=crowdsec_crowdsec -q | head -n1) cscli decisions delete --ip <YOUR_TEST_IP>
|
docker exec -it $(docker ps --filter label=com.docker.swarm.service.name=crowdsec_crowdsec -q | head -n1) cscli decisions delete --ip <YOUR_TEST_IP>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 7) Optional: enable CrowdSec Console (web UI)
|
||||||
|
1. Open https://app.crowdsec.net and create/get an enrollment key for this instance.
|
||||||
|
2. In `swarm/.env`, set:
|
||||||
|
|
||||||
|
```env
|
||||||
|
CROWDSEC_ENROLL_KEY=<paste_enroll_key_from_console>
|
||||||
|
CROWDSEC_ENROLL_INSTANCE_NAME=swarm-edge-01
|
||||||
|
CROWDSEC_ENROLL_TAGS=swarm,traefik,production
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Redeploy CrowdSec:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make deploy-crowdsec
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Confirm enrollment from logs:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker service logs --since 10m crowdsec_crowdsec
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Access the web UI at https://app.crowdsec.net (your instance should appear under your organization).
|
||||||
|
|
||||||
### Notes:
|
### Notes:
|
||||||
```yaml
|
```yaml
|
||||||
# Declaring the user list
|
# Declaring the user list
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ services:
|
|||||||
DOCKER_HOST: tcp://tasks.socket-proxy:2375
|
DOCKER_HOST: tcp://tasks.socket-proxy:2375
|
||||||
COLLECTIONS: "crowdsecurity/traefik"
|
COLLECTIONS: "crowdsecurity/traefik"
|
||||||
CUSTOM_CS_LAPI_KEY: ${CROWDSEC_LAPI_KEY:?Variable not set}
|
CUSTOM_CS_LAPI_KEY: ${CROWDSEC_LAPI_KEY:?Variable not set}
|
||||||
|
# Optional CrowdSec Console enrollment (https://app.crowdsec.net)
|
||||||
|
ENROLL_KEY: ${CROWDSEC_ENROLL_KEY:-}
|
||||||
|
ENROLL_INSTANCE_NAME: ${CROWDSEC_ENROLL_INSTANCE_NAME:-}
|
||||||
|
ENROLL_TAGS: ${CROWDSEC_ENROLL_TAGS:-}
|
||||||
deploy:
|
deploy:
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
|
|||||||
Reference in New Issue
Block a user