Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyKomarovCoder committed Nov 19, 2023
1 parent d48396d commit 1ae9bd8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.SSHKEY }}
rm: true
source: docker-compose.yml, build/schema/initdb.sql, metrics/prometheus/prometheus.yml
source: docker-compose.yml, build/schema/initdb.sql, metrics/prometheus/prometheus.yml, metrics/grafana/grafana.ini
target: ~/${{ env.FOLDER_COMPOSE }}

- name: Get docker form dockerhub via SSH action
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ services:
- type: bind
source: /home/ubuntu/grafana_metrics
target: /var/lib/grafana
- ./metrics/grafana/grafana.ini:/etc/grafana/grafana.ini
networks:
- hamster-net
volumes:
Expand Down
54 changes: 27 additions & 27 deletions local-docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,36 @@ services:
ports:
- "6379:6379"

# prometheus:
# container_name: prometheus
# image: prom/prometheus:latest
# volumes:
# - ./metrics/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml
# ports:
# - "9090:9090"
prometheus:
container_name: prometheus
image: prom/prometheus:latest
volumes:
- ./metrics/prometheus:/etc/prometheus
ports:
- "9090:9090"

# nodeexporter:
# container_name: node_exporter
# image: prom/node-exporter
# volumes:
# - /proc:/host/proc:ro
# - /sys:/host/sys:ro
# - /:/rootfs:ro
# restart: unless-stopped
# ports:
# - "9100:9100"
nodeexporter:
container_name: node_exporter
image: prom/node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
restart: unless-stopped
ports:
- "9100:9100"


# grafana:
# container_name: grafana
# image: grafana/grafana-oss:9.4.3
# user: '0'
# ports:
# - "3000:3000"
# volumes:
# - type: bind
# source: /home/ubuntu/grafana_metrics
# target: /var/lib/grafana
grafana:
container_name: grafana
image: grafana/grafana-oss:9.4.3
user: '0'
ports:
- "3000/metrics:3000"
volumes:
- type: bind
source: /home/ubuntu/grafana_metrics
target: /var/lib/grafana


networks:
Expand Down
3 changes: 3 additions & 0 deletions metrics/prometheus/grafana/grafana.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[server]
root_url = https://hammywallet.ru/grafana/
serve_from_sub_path = true

0 comments on commit 1ae9bd8

Please sign in to comment.