This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
226 lines (219 loc) · 5.79 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
version: '3.7'
services:
app:
image: ghcr.io/solectrus/solectrus:latest
labels:
- 'com.centurylinklabs.watchtower.scope=solectrus'
depends_on:
db:
condition: service_healthy
influxdb:
condition: service_healthy
redis:
condition: service_healthy
links:
- db
- influxdb
- redis
ports:
- 3000:3000
environment:
- APP_HOST
- FORCE_SSL
- SECRET_KEY_BASE
- INSTALLATION_DATE
- ADMIN_PASSWORD
- FRAME_ANCESTORS
- DB_HOST=db
- DB_PASSWORD=${POSTGRES_PASSWORD}
- DB_USER=postgres
- REDIS_URL=redis://redis:6379/1
- INFLUX_HOST
- INFLUX_TOKEN=${INFLUX_TOKEN_READ}
- INFLUX_ORG
- INFLUX_BUCKET
- INFLUX_MEASUREMENT_PV
- INFLUX_MEASUREMENT_FORECAST
- INFLUX_POLL_INTERVAL
- WEB_CONCURRENCY
healthcheck:
test: ['CMD-SHELL', 'nc -z 127.0.0.1 3000 || exit 1']
restart: always
logging:
options:
max-size: '10m'
max-file: '3'
influxdb:
image: influxdb:2.7-alpine
labels:
- 'com.centurylinklabs.watchtower.scope=solectrus'
volumes:
- ${INFLUX_VOLUME_PATH}:/var/lib/influxdb2
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUX_USERNAME}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUX_PASSWORD}
- DOCKER_INFLUXDB_INIT_ORG=${INFLUX_ORG}
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUX_BUCKET}
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUX_ADMIN_TOKEN}
command: influxd run --bolt-path /var/lib/influxdb2/influxd.bolt --engine-path /var/lib/influxdb2/engine --store disk
# Optional: Allow InfluxDB to be accessed from the outside.
# ports:
# - 8086:8086
restart: always
healthcheck:
test: ['CMD', 'influx', 'ping']
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
logging:
options:
max-size: '10m'
max-file: '3'
db:
# Don't change major version if you have an existing database!
# If you have started with an older major version (like 15), you need to migrate your database.
# This is not worth the effort, so don't do it.
image: postgres:16-alpine
labels:
- 'com.centurylinklabs.watchtower.scope=solectrus'
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- ${DB_VOLUME_PATH}:/var/lib/postgresql/data
restart: always
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 20s
retries: 5
start_period: 60s
logging:
options:
max-size: '10m'
max-file: '3'
redis:
image: redis:7-alpine
labels:
- 'com.centurylinklabs.watchtower.scope=solectrus'
volumes:
- ${REDIS_VOLUME_PATH}:/data
restart: always
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 20s
retries: 5
start_period: 60s
logging:
options:
max-size: '10m'
max-file: '3'
senec-collector:
image: ghcr.io/solectrus/senec-collector:latest
labels:
- 'com.centurylinklabs.watchtower.scope=solectrus'
depends_on:
influxdb:
condition: service_healthy
links:
- influxdb
environment:
- SENEC_ADAPTER
- SENEC_HOST
- SENEC_SCHEMA
- SENEC_LANGUAGE
- SENEC_USERNAME
- SENEC_PASSWORD
- SENEC_SYSTEM_ID
- SENEC_INTERVAL
- INFLUX_HOST
- INFLUX_SCHEMA
- INFLUX_PORT
- INFLUX_TOKEN=${INFLUX_TOKEN_WRITE}
- INFLUX_ORG
- INFLUX_BUCKET
- INFLUX_MEASUREMENT=${INFLUX_MEASUREMENT_PV}
restart: always
logging:
options:
max-size: '10m'
max-file: '3'
forecast-collector:
image: ghcr.io/solectrus/forecast-collector:latest
labels:
- 'com.centurylinklabs.watchtower.scope=solectrus'
depends_on:
influxdb:
condition: service_healthy
links:
- influxdb
environment:
- INFLUX_HOST
- INFLUX_TOKEN=${INFLUX_TOKEN_WRITE}
- INFLUX_ORG
- INFLUX_BUCKET
- INFLUX_MEASUREMENT=${INFLUX_MEASUREMENT_FORECAST}
- FORECAST_PROVIDER
- FORECAST_LATITUDE
- FORECAST_LONGITUDE
- FORECAST_DECLINATION
- FORECAST_AZIMUTH
- FORECAST_KWP
- FORECAST_CONFIGURATIONS
- FORECAST_0_LATITUDE
- FORECAST_0_LONGITUDE
- FORECAST_0_DECLINATION
- FORECAST_0_AZIMUTH
- FORECAST_0_KWP
- FORECAST_0_DAMPING_MORNING
- FORECAST_0_DAMPING_EVENING
- FORECAST_1_LATITUDE
- FORECAST_1_LONGITUDE
- FORECAST_1_DECLINATION
- FORECAST_1_AZIMUTH
- FORECAST_1_KWP
- FORECAST_1_DAMPING_MORNING
- FORECAST_1_DAMPING_EVENING
- FORECAST_2_LATITUDE
- FORECAST_2_LONGITUDE
- FORECAST_2_DECLINATION
- FORECAST_2_AZIMUTH
- FORECAST_2_KWP
- FORECAST_2_DAMPING_MORNING
- FORECAST_2_DAMPING_EVENING
- FORECAST_3_LATITUDE
- FORECAST_3_LONGITUDE
- FORECAST_3_DECLINATION
- FORECAST_3_AZIMUTH
- FORECAST_3_KWP
- FORECAST_3_DAMPING_MORNING
- FORECAST_3_DAMPING_EVENING
- FORECAST_INTERVAL
- FORECAST_SOLAR_APIKEY
- FORECAST_DAMPING_MORNING
- FORECAST_DAMPING_EVENING
- FORECAST_HORIZON
- FORECAST_INVERTER
- SOLCAST_APIKEY
- SOLCAST_SITE
- SOLCAST_0_SITE
- SOLCAST_1_SITE
restart: always
logging:
options:
max-size: '10m'
max-file: '3'
watchtower:
image: containrrr/watchtower
labels:
- 'com.centurylinklabs.watchtower.scope=solectrus'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --scope solectrus --cleanup
restart: always
logging:
options:
max-size: '10m'
max-file: '3'