Librecov / librecov

Open source code coverage history webapp
https://www.librecov.com
MIT License
16 stars 1 forks source link

Updated docs? #203

Open com6056 opened 1 year ago

com6056 commented 1 year ago

Found this project after exploring https://github.com/danhper/opencov, awesome you are keeping it going!

Are there any updated docs for getting a deployment of this going though? Seems like quite a few changes have been made but no updates to the README. Right now I'm struggling to get the initial setup done since mix isn't in the Docker image so I can't run mix ecto.setup.

Thanks!

tnarik commented 1 year ago

In addition, running via docker is not possible as the image is unavailable at the moment.

prologic commented 1 year ago

I've pushed a Docker build of this to my Docker Hub account at prologic/librecov

prologic commented 1 year ago

I wasn't able to get this working 😢 I just keep getting "502 Bad Gateway" despite no errors

Here's my docker-compose.yml:

---
version: "3.8"

services:
  db:
    image: postgres:9.5
    volumes:
      - db:/var/lib/postgresql/data/pgdata
    environment:
      PGDATA: /var/lib/postgresql/data/pgdata
      POSTGRES_PASSWORD: '<redacted>'
    networks:
      - librecov
    deploy:
      replicas: 1

  setup:
    image: prologic/librecov:dev
    command: mix ecto.setup
    environment:
      DATABASE_URL: "ecto://postgres:<redacted>@db/opencov_prod?ssl=false"
      SECRET_KEY_BASE: "<redacted>"
    networks:
      - librecov
    deploy:
      restart_policy:
        condition: none

  librecov:
    image: prologic/librecov
    environment:
      PORT: "4000"
      DATABASE_URL: "postgres://postgres:<redacted>@db/opencov_prod?ssl=false"
      SECRET_KEY_BASE: "<redacted>"
      LIBRECOV_HOST: "cov.mydomain.com"
      LIBRECOV_CDN_HOST: "cov.mydomain.com"
    networks:
      - traefik
      - librecov
    deploy:
      replicas: 1
      labels:
        - "traefik.enable=true"
        - "traefik.docker.network=traefik"
        - "traefik.http.services.coverage_librecov.loadbalancer.server.port=4000"
        - "traefik.http.routers.coverage_librecov.rule=Host(`cov.mydomain.com`)"
        - "traefik.http.routers.coverage_librecov.priority=2"
      restart_policy:
        condition: on-failure

networks:
  traefik:
    external: true
  librecov:
    driver: overlay

volumes:
  db:
    driver: local

I also pushed a modified version of the Dockerfile as prologic/librecov:dev as this app doesn't seem to do its own database setup or migrations on startup, so you need to have a service (which I've called setup) that uses the "dev" image with all the tooling installed just to run mix ecto:setup 🤷‍♂️

rschmied commented 1 year ago

@prologic I'm actively looking at this as well -- would be interested in a solution. My goal is to run this on a local docker instance for our little project. Need to run standalone, HA is not really an issue. I got the containers via compose up but it never listens on anything that looks consumable... Inside of the librecov container I get processes running, but there's no process listening on tcp/4000 or tcp/80.

This is all new territory for me (especially the erlang piece), so i don't even know where to start troubleshooting...

prologic commented 1 year ago

@rschmied Unfortunately I failed. I was not able to get this software running, or I think I got it running but it is quite bad to use and doesn't even work. 😢

rschmied commented 1 year ago

thanks, @prologic -- i wonder if @yknx4 could share some insight. obviously, there is some interest to get this off the ground and a little more clarity on the documentation would certainly help me and others!

AbdealiLoKo commented 1 year ago

I also found this project looking at opencov Wondering if anyone has been able to get it working recently ...

Drowze commented 4 months ago

This is such a nice project - considering learning Elixir because of this 👀