-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
109 lines (97 loc) · 2.86 KB
/
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
version: '3'
services:
provider_portal:
build: ./provider_portal
container_name: provider_portal
ports:
- 8100:8100
- 8090:8090
volumes:
- ./provider_portal:/app/provider_portal
- ./smart_meter/config/certificates/smartmeter_certificates:/app/smart_meter/config/certificates/smartmeter_certificates
networks:
internal:
ipv4_address: 10.0.1.10
depends_on:
- mysql
smart_meter:
build: ./smart_meter
container_name: smart_meter
volumes:
- ./smart_meter:/app/smart_meter
networks:
internal:
ipv4_address: 10.0.1.20
influxdb:
image: influxdb:latest
container_name: influxdb
security_opt:
- no-new-privileges:true
restart: unless-stopped
ports:
- 8086:8086
environment:
DOCKER_INFLUXDB_INIT_MODE: "setup"
DOCKER_INFLUXDB_INIT_USERNAME: "admin"
DOCKER_INFLUXDB_INIT_PASSWORD_FILE: /run/secrets/influx_root_password
DOCKER_INFLUXDB_INIT_ORG: "provider"
DOCKER_INFLUXDB_INIT_BUCKET: "smartmeter"
DOCKER_INFLUXDB_INIT_RETENTION: "520w"
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN_FILE: /run/secrets/influx_token
INFLUXD_TLS_CERT: "/etc/ssl/influx-public-key.pem"
INFLUXD_TLS_KEY: "/etc/ssl/influx-private-key.pem"
INFLUXDB_HTTP_HTTPS_ENABLED: "true"
secrets:
- influx_token
- influx_root_password
volumes:
- ./provider_portal/db_data/influx/config:/etc/influxdb2
- ./provider_portal/db_data/influx/db:/var/lib/influxdb2
- ./provider_portal/db_data/influx/config/influx-private-key.pem:/etc/ssl/influx-private-key.pem
- ./provider_portal/db_data/influx/config/influx-public-key.pem:/etc/ssl/influx-public-key.pem
networks:
internal:
ipv4_address: 10.0.1.30
mysql:
image: mysql
container_name: mysql
restart: always
environment:
MYSQL_DATABASE: 'provider'
MYSQL_USER: 'provider'
MYSQL_PASSWORD_FILE: /run/secrets/db_password
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
secrets:
- db_password
- db_root_password
volumes:
- ./provider_portal/db_data/mysql:/var/lib/mysql
networks:
internal:
ipv4_address: 10.0.1.40
phpmyadmin:
image: lscr.io/linuxserver/phpmyadmin
container_name: phpmyadmin
restart: always
ports:
- 8081:80
environment:
- PMA_ARBITRARY=1
networks:
internal:
ipv4_address: 10.0.1.50
secrets:
db_password:
file: provider_portal/config/secrets/db_password.txt
db_root_password:
file: provider_portal/config/secrets/db_root_password.txt
influx_root_password:
file: provider_portal/config/secrets/influx_root_password.txt
influx_token:
file: provider_portal/config/secrets/influx_token.txt
networks:
internal:
driver: bridge
ipam:
config:
- subnet: 10.0.1.0/24