Skip to content

Commit

Permalink
fix: docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Celesca committed Nov 20, 2024
1 parent 88c18ec commit e3b4113
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3.7'

services:

db:
image: mysql:5.7
container_name: hackathon_db
Expand Down Expand Up @@ -30,10 +29,62 @@ services:
networks:
- my_network

# SonarQube Database (PostgreSQL)
sonarqube_db:
image: postgres:13-alpine
container_name: sonarqube_db
environment:
POSTGRES_USER: sonar
POSTGRES_PASSWORD: sonar
POSTGRES_DB: sonarqube
volumes:
- sonarqube_db_data:/var/lib/postgresql/data
networks:
- my_network

# SonarQube Service
sonarqube:
image: sonarqube:community
container_name: sonarqube
environment:
SONAR_JDBC_URL: jdbc:postgresql://sonarqube_db:5432/sonarqube
SONAR_JDBC_USERNAME: sonar
SONAR_JDBC_PASSWORD: sonar
ports:
- '9000:9000' # SonarQube UI
depends_on:
- sonarqube_db
networks:
- my_network

# Prometheus Service
prometheus:
image: prom/prometheus
container_name: prometheus
ports:
- "9090:9090" # Prometheus UI
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml # Mount the Prometheus config
networks:
- my_network

# Grafana Service
grafana:
image: grafana/grafana
container_name: grafana
ports:
- "3001:3000" # Expose Grafana on port 3001
depends_on:
- prometheus
networks:
- my_network

networks:
my_network:
driver: bridge

volumes:
mysql_data:
driver: local
sonarqube_db_data:
driver: local

0 comments on commit e3b4113

Please sign in to comment.