Skip to content
Snippets Groups Projects
Commit 967d3767 authored by jabertwo's avatar jabertwo
Browse files

delete crowdsec

parent d6d0a1fd
No related branches found
No related tags found
No related merge requests found
---
- name: "create folder struct for {{ servicename }}"
file:
path: "{{ item }}"
state: "directory"
with_items:
- "{{ basedir }}"
- name: "deploy {{ servicename }} config files"
template:
dest: "{{ basedir }}/{{ item }}"
src: "{{ item }}"
mode: 0644
with_items:
- docker-compose.yml
register: config
# Start containers
- name: "stop {{ servicename }} docker"
community.docker.docker_compose_v2:
project_src: "{{ basedir }}"
state: absent
when: config.changed
- name: "start {{ servicename }} docker"
community.docker.docker_compose_v2:
project_src: "{{ basedir }}"
state: present
\ No newline at end of file
FROM metabase/metabase:v0.46.6.4
RUN mkdir /data/ && wget https://crowdsec-statics-assets.s3-eu-west-1.amazonaws.com/metabase_sqlite.zip && unzip metabase_sqlite.zip -d /data/
\ No newline at end of file
services:
app:
image: crowdsecurity/crowdsec:v1.5.2
healthcheck:
test: ["CMD", "cscli", "version"]
interval: 20s
timeout: 2s
retries: 5
start_period: 10s
ports:
- "127.0.0.1:8080:8080"
environment:
COLLECTIONS: "crowdsecurity/traefik crowdsecurity/http-cve crowdsecurity/whitelist-good-actors crowdsecurity/iptables crowdsecurity/linux crowdsecurity/nginx crowdsecurity/sshd"
GID: "${GID-1000}"
CUSTOM_HOSTNAME: dSHB
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/log:/var/log:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /var/run/systemd/journal/socket:/var/run/systemd/journal/socket:ro
- {{ basedir }}/appdata/crowdsec/data:/var/lib/crowdsec/data
- {{ basedir }}/appdata/crowdsec/config:/etc/crowdsec
- {{ basedir }}/crowdsec-db:
dashboard:
build: ./crowdsec/dashboard
restart: always
environment:
MB_DB_FILE: /data/metabase.db
MGID: "${GID-1000}"
labels:
- traefik.enable=true
- traefik.http.routers.{{ servicename }}.rule=Host(`{{ domain }}`)
- traefik.http.routers.{{ servicename }}.entrypoints=websecure
- traefik.http.services.{{ servicename }}.loadbalancer.server.port=3000
volumes:
- crowdsec-db:/metabase-data/
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment