Skip to content

Instantly share code, notes, and snippets.

@tuanpembual
Created September 14, 2019 03:45
Show Gist options
  • Save tuanpembual/0f7bded79e6ae12582f5cefc14a6180c to your computer and use it in GitHub Desktop.
Save tuanpembual/0f7bded79e6ae12582f5cefc14a6180c to your computer and use it in GitHub Desktop.
version: '3'
services:
nginx-proxy:
build: ./nginx
restart: unless-stopped
hostname: nginx
container_name: nginx
volumes:
- ./nginx:/etc/nginx/conf.d
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/ssl/fardani.id.cert:/etc/nginx/ssl/fardani.id.cert
- ./nginx/ssl/fardani.id.key:/etc/nginx/ssl/fardani.id.key
- ./nginx/ssl/dhparam.pem:/etc/nginx/ssl/dhparam.pem
networks:
- nexus-net
ports:
- '80:80'
- '443:443'
links:
- nexus
- sonarqube
command: [ nginx, '-g', 'daemon off;' ]
nexus:
image: sonatype/nexus3:3.14.0
restart: unless-stopped
hostname: nexus
container_name: nexus
networks:
- nexus-net
ports:
- '8081:8081'
- '5000:5000'
sonarqube:
image: sonarqube:latest
hostname: sonarqube
container_name: sonarqube
restart: unless-stopped
ports:
- "9000:9000"
networks:
- nexus-net
environment:
- SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar
volumes:
- sonarqube_conf:/opt/sonarqube/conf
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
- ./sonarqube/sonar.properties:/opt/sonarqube/conf/sonar.properties
db:
image: postgres
hostname: db
container_name: db
networks:
- nexus-net
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
volumes:
nexus-data:
sonarqube_conf:
sonarqube_data:
sonarqube_extensions:
sonarqube_bundled-plugins:
postgresql:
postgresql_data:
networks:
nexus-net:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment