-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 2.38 KB
/
docker-compose.yml
File metadata and controls
72 lines (68 loc) · 2.38 KB
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
---
name: "weewx"
volumes:
weewx_data:
services:
# Unified initialization: Create weewx.conf, install GW1000 driver and nginx configuration
weewx-init:
build:
context: .
dockerfile: Dockerfile.init
volumes:
- weewx_data:/data
environment:
- PATH=/opt/venv/bin:/usr/local/bin:/usr/bin:/bin
- PIP_TARGET=/data/lib/python/site-packages
- PYTHONPATH=/data/lib/python/site-packages
- WEEWX_LOCATION=${WEEWX_LOCATION:-My Cosy Weather Station}
- WEEWX_VERBOSE_HARDWARE=${WEEWX_VERBOSE_HARDWARE:-Personal Weather Station}
- WEEWX_LATITUDE=${WEEWX_LATITUDE:-42.2627}
- WEEWX_LONGITUDE=${WEEWX_LONGITUDE:-11.3945}
- "WEEWX_ALTITUDE=${WEEWX_ALTITUDE:-587, meter}"
- WEEWX_STATION_URL=${WEEWX_STATION_URL:-}
- WEEWX_RAIN_YEAR_START=${WEEWX_RAIN_YEAR_START:-1}
- WEEWX_WEEK_START=${WEEWX_WEEK_START:-0}
- WEEWX_UNIT_SYSTEM=${WEEWX_UNIT_SYSTEM:-metric}
- WEEWX_LANGUAGE=${WEEWX_LANGUAGE:-en}
- WEEWX_TIMEZONE=${WEEWX_TIMEZONE:-}
# Extension configuration
- ENABLE_GW1000_DRIVER=${ENABLE_GW1000_DRIVER:-true}
- GW1000_IP=${GW1000_IP:-192.168.1.10}
- GW1000_USE_PIEZO_RAIN=${GW1000_USE_PIEZO_RAIN:-false}
- ENABLE_INIGO_EXTENSION=${ENABLE_INIGO_EXTENSION:-true}
- INIGO_VERSION=${INIGO_VERSION:-1.0.17}
- ENABLE_BELCHERTOWN_SKIN=${ENABLE_BELCHERTOWN_SKIN:-true}
- BELCHERTOWN_VERSION=${BELCHERTOWN_VERSION:-1.3.1}
- WEEWX_SKIN=${WEEWX_SKIN:-Seasons}
restart: "no"
# This container handles all initialization: weewx.conf, GW1000 driver, and nginx config
# Run WeeWX normally with locale support
weewx:
build:
context: .
dockerfile: Dockerfile.runtime
depends_on:
weewx-init:
condition: service_completed_successfully
volumes:
- weewx_data:/data
environment:
- GW1000_IP=${GW1000_IP:-192.168.1.10}
restart: unless-stopped
# Nginx web server to serve WeeWX web content
nginx:
image: nginx:alpine
depends_on:
- weewx
- weewx-init # Ensure nginx config is available
ports:
- "${NGINX_PORT:-8080}:80"
volumes:
- weewx_data:/data:ro
command: >
sh -c "
cp /data/nginx/nginx.conf /etc/nginx/nginx.conf &&
exec nginx -g 'daemon off;'
"
restart: unless-stopped
# Copies nginx.conf from shared volume to expected location on startup