-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yaml
74 lines (66 loc) · 1.62 KB
/
docker-compose.yaml
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
version: "3.0"
services:
postgresdb:
image: postgres
container_name: postgresdb
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pass
POSTGRES_DB: mydb
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d mydb -U postgres" ]
interval: 5s
timeout: 3s
retries: 10
networks:
- springboot-postgres-net
departmentapi:
container_name: departmentapi
build:
context: ./
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
postgresdb:
condition: service_healthy
networks:
- springboot-postgres-net
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgresdb:5432/mydb
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: pass
SPRING_JPA_HIBERNATE_DDL_AUTO: update
EMAIL_HOST: mailhog
restart: on-failure
mailhog:
container_name: mailhog
image: mailhog/mailhog:v1.0.1
ports:
- "8025:8025"
- "1025:1025"
networks:
- springboot-postgres-net
restart: always
# By default, SonarQube is using h2 database which is not recommended for production
sonarqube:
image: sonarqube:latest
container_name: sonarqube
ports:
- "9000:9000"
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_logs:/opt/sonarqube/logs
- sonarqube_temp:/opt/sonarqube/temp
networks:
sonar:
springboot-postgres-net:
driver: bridge
volumes:
sonarqube_data:
sonarqube_extensions:
sonarqube_logs:
sonarqube_temp: