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

Add Dockerfile #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Sevenlive
Copy link

@Sevenlive Sevenlive commented Mar 15, 2022

Regarding the Issue #25 i build a Dockerfile for using the prometheus exporter in docker. You just need to mount the Storage "/var/lib/varnish" from your varnish container as Read-Only and you're ready to go.

I would suggest adding a github Action as well, so everytime a new release is deployed, the github action would build a container and put it into the github Registry of this project.

version: '2'

services:
  varnish:
    image: varnish
    volumes:
      - varnish_tmpfs:/var/lib/varnish
      - "./default.vcl:/etc/varnish/default.vcl"
    ports:
      - 80:80

  varnishexporter:
    image: prometheus_varnish_exporter:master
    restart: always
    environment:
      VSM_NOPID: 1
    depends_on:
      - varnish
    ports:
      - 9131:9131
    volumes:
      - varnish_tmpfs:/var/lib/varnish/:ro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant