Skip to content

Instantly share code, notes, and snippets.

@joshhunt
Last active November 1, 2022 07:21
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joshhunt/5adc58b3a61dd772c09752e771d33c4b to your computer and use it in GitHub Desktop.
Save joshhunt/5adc58b3a61dd772c09752e771d33c4b to your computer and use it in GitHub Desktop.
Docker Compose file for grafana/nginx reverse proxy
version: "3"
services:
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 8080:80
networks:
- my-network-name
grafana:
container_name: grafana
image: grafana/grafana:latest
volumes:
- ../plugins/:/etc/grafana/plugins/ # For locally developed plugins
- ./grafana/provisioning/:/etc/grafana/provisioning/ # Automatically configure datasources
- grafana_vol:/var/lib/grafana # Volume to persist configuration between restarts
environment:
- "GF_SECURITY_ADMIN_PASSWORD=pwd"
- GF_USERS_ALLOW_SIGN_UP=false
- GF_INSTALL_PLUGINS=grafana-azure-data-explorer-datasource # Auto install plugins from grafana.com
- GF_SERVER_HTTP_PORT=3001
- GF_SERVER_PROTOCOL=http
- GF_SERVER_DOMAIN=localhost:8080
- GF_SERVER_ROOT_URL=http://localhost:8080/grafana/
- GF_SERVER_SERVE_FROM_SUB_PATH=true
expose:
- 3001
networks:
- my-network-name
volumes:
grafana_vol:
networks:
my-network-name:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment