-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
94 lines (93 loc) · 2.31 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
version: '2'
services:
## Applications Code Container #############################
applications:
image: tianon/true
volumes:
- ${APPLICATION}:/var/www/nodeapp
utility-container:
build:
context: ./containers/utility-container
args:
- INSTALL_WORKSPACE_SSH=true
- PUID=1000
- PGID=1000
- TZ=UTC
- DEFAULT_TEST_CONFIG=${DEFAULT_TEST_CONFIG}
volumes_from:
- applications
ports:
- "22"
networks:
- sonarnet
tty: true
node:
build:
context: ./containers/node
volumes_from:
- applications
ports:
- "${NODE_HOST_PORT}:8080"
networks:
- sonarnet
tty: true
sonarqube:
build:
context: ./containers/sonarqube
depends_on:
- postgres
ports:
- "${SONARQUBE_HOST_PORT}:9000"
- "${SONARQUBE_HOST_DATABASE_PORT}:9092"
networks:
- sonarnet
environment:
- SONARQUBE_JDBC_USERNAME=${SONARQUBE_JDBC_USERNAME}
- SONARQUBE_JDBC_PASSWORD=${SONARQUBE_JDBC_PASSWORD}
- SONARQUBE_JDBC_URL=${SONARQUBE_JDBC_URL}
volumes:
- sonarqube_conf:/opt/sonarqube/conf
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
volumes_from:
- applications
postgres:
image: postgres:alpine
networks:
- sonarnet
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgresql:/var/lib/postgresql
# This needs explicit mapping due to https://github.com/docker-library/postgres/blob/4e48e3228a30763913ece952c611e5e9b95c8759/Dockerfile.template#L52
- postgresql_data:/var/lib/postgresql/data
jenkins:
build:
context: ./containers/jenkins
volumes:
- jenkins_home:/var/jenkins_home
volumes_from:
- applications
networks:
- sonarnet
ports:
- "${JENKINS_HOST_PORT}:8080"
- "${JENKINS_HOST_API_PORT}:50000"
links:
- sonarqube
- utility-container
volumes:
##### DEVELOPMENT VOLUMES
postgresql:
postgresql_data:
sonarqube_conf:
sonarqube_data:
sonarqube_extensions:
sonarqube_bundled-plugins:
jenkins_home:
#### DEVELOPMENT NETWORK
networks:
sonarnet:
driver: bridge