Monogramm / docker-fail2web

:whale: Docker image for fail2web.
https://github.com/Sean-Der/fail2web
GNU Affero General Public License v3.0
5 stars 4 forks source link

/api/global/status returns 404 #3

Open alexandreMesle opened 3 years ago

alexandreMesle commented 3 years ago

Describe the bug

The fail2rest service always respond 404.

To Reproduce

Using this docker-compose file given below, the fail2rest service will always respond 404.

Especially, the ajax call from the https://fail2web.XXXXXX/ to https://fail2rest.XXXXXX/api/global/status responds 404.

What I aldready tried

Moreover, I don't really understand where the fail2rest sessions are secured... Shouldn't the environment variables containing the credentials be shared across the fail2web and fail2rest containers ?

Expected behavior

I suppose the ajax call is supposed to return 200 ?

Docker (please complete the following information):

Desktop (please complete the following information):

Smartphone (please complete the following information): Same behavior on all devices.

Additional context Here is the docker-compose file :

version: "3.5"

services:
  fail2ban:
    image: crazymax/fail2ban:latest
    container_name: f2b_fail2ban
    environment:
      SSMTP_HOST: XXXXXXXXXXXX
      SSMTP_PORT: XXXXXXXXXXXX
      SSMTP_HOSTNAME: XXXXXXXXXXX
      SSMTP_USER: XXXXXXXXXXXXX
      SSMTP_PASSWORD: XXXXXXXXXXXX
      SSMTP_TLS: XXXXXXXXXXXXX
    cap_add:
      - NET_ADMIN
      - NET_RAW
    volumes:
      - ./proc/fail2ban/:/var/run/fail2ban/
      - XXXXXXXXXXXXXXXXXXXXXXXXXX
    restart: always

  fail2web:
    image: monogramm/docker-fail2web
    container_name: f2b_fail2web
    restart: always
    networks:
      - traefik_network
    environment:
      - FAIL2REST_ADDR=http://fail2rest.XXXX
      - FAIL2REST_USER=XXXX
      - FAIL2REST_PASSWD=XXXXXX
    volumes:
      - ./proc/fail2web/:/srv/fail2web/
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    labels:
      - "traefik.enable=true"
      - "traefik.frontend.rule=Host:fail2web.XXXXXX"
      - "traefik.port=80"
      - "traefik.backend=fail2web"
      - "traefik.frontend.redirect.entryPoint=https"
      - "traefik.frontend.entryPoints=http,https"

  fail2rest:
    image: monogramm/docker-fail2rest
    container_name: f2b_fail2rest
    restart: always
    networks:
      - traefik_network
    volumes:
      - ./proc/fail2rest/:/srv/fail2rest/
      - ./proc/fail2ban/:/var/run/fail2ban/
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    labels:
      - "traefik.enable=false"
      - "traefik.frontend.rule=Host:fail2rest.XXXXXXXXXXXX"
      - "traefik.port=5000"
      - "traefik.backend=fail2rest"
      - "traefik.frontend.redirect.entryPoint=https"
      - "traefik.frontend.entryPoints=http,https"

networks:
  traefik_network:
    external: true