-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
120 lines (110 loc) · 3.26 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: '3.8'
# docker system prune -a --volumes
# max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144];
# sudo sysctl -w vm.nax_map_count=<number provided>
# sudo sysctl -w vm.nax_map_count=262144
services:
web:
container_name: web
image: kmtsvetanov/symfony-nginx-php:1.0
ports:
- "80:80"
app:
container_name: app
image: kmtsvetanov/symfony-php-composer:1.0
working_dir: /var/www
environment:
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
MYSQL_HOST: db
MYSQL_PORT: ${MYSQL_PORT}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
REDIS_HOST: cache
REDIS_PORT: ${REDIS_PORT}
extra_hosts:
# Ensure that host.docker.internal is correctly defined on Linux
- host.docker.internal:host-gateway
db:
container_name: db
image: mysql:8.0
volumes:
- mysqldata:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
cache:
container_name: cache
image: redis:latest
sonarqube:
container_name: sonarqube
build:
dockerfile: ./docker/sonarqube/Dockerfile
depends_on:
- sonarqube-database
environment:
- SONARQUBE_JDBC_URL=jdbc:postgresql://sonarqube-database:5432/sonarqube
- SONARQUBE_JDBC_USERNAME=sonarqube # DB username
- SONARQUBE_JDBC_PASSWORD=sonarpass #DB password
volumes:
- ./app:/var/www
- sonarqube_data:/opt/sonarqube/data # Persist SonarQube data
- sonarqube_extensions:/opt/sonarqube/extensions # Persist extensions/plugins
ports:
- "9000:9000" # SonarQube web interface
- "9092:9092" # SonarQube internal communication
sonarqube-database:
container_name: sonarqube-database
image: postgres:12
environment:
- POSTGRES_DB=sonarqube
- POSTGRES_USER=sonarqube # DB username
- POSTGRES_PASSWORD=sonarpass #DB password
volumes:
- sonarqube_database:/var/lib/postgresql
- sonarqube_database_data:/var/lib/postgresql/data
ports:
- "5432:5432"
# Commented because low CPU and Memory on Laptop ( http://localhost:9200/ and http://localhost:5601/app/dev_tools#/console )
# es01:
# image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
# container_name: es01
# environment:
# - node.name=es01
# - cluster.name=es-docker-cluster
# - discovery.type=single-node
# - xpack.security.enabled=false # Disable X-Pack security
# ports:
# - 9200:9200
# volumes:
# - es-data-es01:/usr/share/elasticsearch/data
# networks:
# - elastic
#
# kibana:
# image: docker.elastic.co/kibana/kibana:8.11.0
# container_name: kibana
# environment:
# - ELASTICSEARCH_HOSTS=http://es01:9200 # Connect using plain HTTP
# ports:
# - 5601:5601
# depends_on:
# - es01
# networks:
# - elastic
#networks:
# elastic:
# driver: bridge
volumes:
mysqldata:
sonarqube_database_data:
sonarqube_bundled-plugins:
sonarqube_conf:
sonarqube_data:
sonarqube_database:
sonarqube_extensions:
# es-data-es01: