From fbe1b74ef209faf73d11892804a48ff57de6ba4f Mon Sep 17 00:00:00 2001 From: igna Date: Thu, 9 May 2024 19:05:06 -0400 Subject: [PATCH 1/2] remove `version` key since it's deprecated --- docker-compose.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2e371566..4183726c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,3 @@ -version: "3.4" - -volumes: - caddy-data: {} - caddy-config: {} - logs: {} - services: crowdsec: image: crowdsecurity/crowdsec @@ -24,4 +17,9 @@ services: - caddy-data:/data - caddy-config:/config - logs:/var/log/caddy - - ./docker/config.json:/etc/caddy/config.json \ No newline at end of file + - ./docker/config.json:/etc/caddy/config.json + +volumes: + caddy-data: + caddy-config: + logs: From 5f0eff736e944f488876c0c5c25f39b6a0e133a7 Mon Sep 17 00:00:00 2001 From: igna Date: Thu, 9 May 2024 19:06:21 -0400 Subject: [PATCH 2/2] `docker-compose` is deprecated --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9caea6f0..1f33c696 100644 --- a/README.md +++ b/README.md @@ -183,10 +183,10 @@ Steps to run this demo are as follows: ```bash # run CrowdSec container -$ docker-compose up -d crowdsec +$ docker compose up -d crowdsec # add the Caddy bouncer, generating an API key -$ docker-compose exec crowdsec cscli bouncers add caddy-bouncer +$ docker compose exec crowdsec cscli bouncers add caddy-bouncer # copy and paste the API key in the ./docker/config.json file # below is the git diff after changing the appropriate line: @@ -196,10 +196,10 @@ $ git diff + "api_key": "9e4ac94cf9aebaa3625a1d51951230a9", # run Caddy; at first run a custom build will be created using xcaddy -$ docker-compose up -d caddy +$ docker compose up -d caddy # tail the logs -$ docker-compose logs -tf +$ docker compose logs -tf ``` You can then access https://localhost:9443 and https://localhost:8443.