caprover / one-click-apps

Community Maintained One Click Apps (https://github.com/caprover/caprover)
Apache License 2.0
557 stars 545 forks source link

App Suggestion: Loki #668

Open clouedoc opened 2 years ago

clouedoc commented 2 years ago

Loki is a log database that is well integrated with Grafana. It would make sense to have Loki as a Caprover one-click app to help deploy a complete telemetry stack.

Do you know if there is any official Docker image for the app?

This image is the official image for Loki: https://hub.docker.com/r/grafana/loki

clouedoc commented 2 years ago

To deploy Loki, I used the following method:

  1. Create an app named "loki"
  2. Deploy Docker image named grafana/loki:main-6205b96
  3. Add a persistent volume. Directory: /loki, volume name: loki-data
  4. Set container HTTP port to 3100
  5. Enable HTTPS
  6. Enable basic authentication.
JannikArndt commented 2 years ago

Thank you for the helpful instructions 👍

Some more clues:

kinsomicrote commented 1 year ago

Hello @clouedoc and @JannikArndt thanks for this. I have a question though; do you make use of promtail too? If so, how are you making it work?

kinsomicrote commented 1 year ago

Never mind, I've figured it out - I don't need promtail. However, I'm faced with an issue where I get an error like this for my Rails app container;

Sep 21 10:08:33 server dockerd[70205]: time="2023-09-21T10:08:33.505909778Z" level=error msg="Not continuing with pull after error: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n"
Sep 21 10:08:33 server dockerd[70205]: time="2023-09-21T10:08:33.505979898Z" level=info msg="Ignoring extra error returned from registry" error="unauthorized: authentication required"
Sep 21 10:08:33 server dockerd[70205]: time="2023-09-21T10:08:33.509659128Z" level=error msg="pulling image failed" error="pull access denied for img-captain-railsapp, repository does not exist or may require 'docker login': denied: requested access to the resource is denied" module=node/agent/taskmanager node.id= service.id=
Sep 21 10:08:47 server dockerd[70205]: time="2023-09-21T10:08:47.137726268Z" level=info msg="Container failed to exit within 10s of signal 15 - using the force" container=

Looks like a docker thing, not sure what the solution is yet.

clouedoc commented 1 year ago

@kinsomicrote this is not related, so you should ask your question somewhere else. I'll give you a hint: pull access denied for img-captain-railsapp <-- are you sure this is the Docker image you want to be pulling?

pcace commented 9 months ago

To deploy Loki, I used the following method:

  1. Create an app named "loki"
  2. Deploy Docker image named grafana/loki:main-6205b96
  3. Add a persistent volume. Directory: /loki, volume name: loki-data
  4. Set container HTTP port to 3100
  5. Enable HTTPS
  6. Enable basic authentication.

Hi there, i have just followed these instructions, but run into this problem:

2024-01-30T13:51:19.528971112Z level=warn ts=2024-01-30T13:51:19.48553466Z caller=scheduler_processor.go:98 msg="error contacting scheduler" err="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 10.0.0.62:9095: i/o timeout\"" addr=10.0.0.62:9095

do you have any idea what that is or where that comes from?

mebaysan commented 2 months ago

I published an article on Medium. Hopefully, this can help you for containerized setup.

https://mebaysan.medium.com/do-not-fly-blind-setup-grafana-loki-for-caprover-docker-swarm-f60abd75c203