-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
76 lines (70 loc) · 1.77 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
version: "3.9"
services:
database:
container_name: database
image: mysql:8.0.33
restart: always
env_file:
- .env # Use the .env file for environment variables
environment:
MYSQL_DATABASE: parkinglot
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_ROOT_HOST: '%'
MYSQL_PORT: 3307
volumes:
- ./db:/var/lib/mysql
ports:
- "3307:3306"
networks:
- parkinglotNetwork
parkinglot:
image: 'parkinglot:latest'
build:
context: .
dockerfile: Dockerfile
container_name: parkinglot
restart: on-failure
env_file:
- .env # Use the .env file for environment variables
ports:
- "1222:1222"
environment:
- server.port=1222
- spring.datasource.username=${DATABASE_USERNAME}
- spring.datasource.password=${DATABASE_PASSWORD}
- PARKING_LOT_DB_IP=database
- PARKING_LOT_DB_PORT=3307
- spring.datasource.url=jdbc:mysql://host.docker.internal:3307/parkinglot
depends_on:
- database
networks:
- parkinglotNetwork
prometheus:
image: prom/prometheus:v2.35.0
container_name: prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./data/prometheus/config:/etc/prometheus/
command:
- '--config.file=/etc/prometheus/prometheus.yml'
networks:
- parkinglotNetwork
grafana:
image: grafana/grafana-oss:8.5.2
pull_policy: always
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./data/grafana:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SERVER_DOMAIN=localhost
networks:
- parkinglotNetwork
networks:
parkinglotNetwork: