version: '3.1' services: golang: build: context: ./ dockerfile: Dockerfile container_name: golang restart: always ports: - '8080:8080' grafana: # default credentials admin/admin image: grafana/grafana:latest container_name: grafana ports: - "3000:3000" volumes: - grafana-storage:/var/lib/grafana prometheus: image: prom/prometheus:v2.24.0 volumes: - ./prometheus/:/etc/prometheus/ - prometheus_data:/prometheus command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' - '--web.console.libraries=/usr/share/prometheus/console_libraries' - '--web.console.templates=/usr/share/prometheus/consoles' ports: - 9090:9090 restart: always volumes: grafana-storage: prometheus_data: