Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Automatic information update #40

Open
John710 opened this issue Oct 22, 2024 · 2 comments
Open

[FR] Automatic information update #40

John710 opened this issue Oct 22, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@John710
Copy link

John710 commented Oct 22, 2024

Add an automatic information update parameter in Docker-compose environments, possibly cron.

@John710 John710 added the enhancement New feature or request label Oct 22, 2024
@sergi0g
Copy link
Owner

sergi0g commented Oct 22, 2024

Hello @John710!

Automatic refreshing is something that is useful and I'll definitely consider implementing it in the future.

Until then, you can create a cronjob to make a GET request to the /refresh endpoint and then retrieve the new data. To help others looking for the same, you can also create a guide on how to configure it and I'll happily include it in the docs.

Thanks for opening this issue!

@sergi0g sergi0g added this to Roadmap Oct 22, 2024
@sergi0g sergi0g moved this to Planned in Roadmap Oct 22, 2024
@jdevera
Copy link

jdevera commented Nov 7, 2024

Thanks for the idea, I've set this up and it's working well:

services:
  cup:
    image: ghcr.io/sergi0g/cup
    restart: unless-stopped
    container_name: cup
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: serve -p 9000

  cupdate:
    image: whefter/cron:v1.0.7
    restart: unless-stopped
    environment:
      CRON_CUP: "*/15 * * * * /usr/bin/curl -s http://cup:9000/refresh"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Planned
Development

No branches or pull requests

3 participants