File tree Expand file tree Collapse file tree 6 files changed +42
-14
lines changed Expand file tree Collapse file tree 6 files changed +42
-14
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ redis/tls
2424redis /data
2525
2626k8s /
27- docker /
27+ docker /* .dockerfile
2828docker-compose * .yml
2929
3030* .md
Original file line number Diff line number Diff line change @@ -4,10 +4,8 @@ services:
44 build :
55 context : .
66 dockerfile : ./docker/controller.dockerfile
7- environment :
8- - TZ=${TZ:-Asia/Shanghai}
9- - NETPULSE_REDIS__PASSWORD=${NETPULSE_REDIS__PASSWORD}
10- - NETPULSE_SERVER__API_KEY=${NETPULSE_SERVER__API_KEY}
7+ env_file :
8+ - .env
119 volumes :
1210 - ./config:/app/config
1311 - ./redis/tls:/app/redis/tls:ro
@@ -25,9 +23,8 @@ services:
2523 build :
2624 context : .
2725 dockerfile : ./docker/node_worker.dockerfile
28- environment :
29- - TZ=${TZ:-Asia/Shanghai}
30- - NETPULSE_REDIS__PASSWORD=${NETPULSE_REDIS__PASSWORD}
26+ env_file :
27+ - .env
3128 volumes :
3229 - ./config:/app/config
3330 - ./redis/tls:/app/redis/tls:ro
@@ -45,9 +42,8 @@ services:
4542 build :
4643 context : .
4744 dockerfile : docker/fifo_worker.dockerfile
48- environment :
49- - TZ=${TZ:-Asia/Shanghai}
50- - NETPULSE_REDIS__PASSWORD=${NETPULSE_REDIS__PASSWORD}
45+ env_file :
46+ - .env
5147 volumes :
5248 - ./config:/app/config
5349 - ./redis/tls:/app/redis/tls:ro
@@ -60,8 +56,8 @@ services:
6056
6157 redis :
6258 image : redis:7-bookworm
63- environment :
64- - TZ=${TZ:-Asia/Shanghai}
59+ env_file :
60+ - .env
6561 volumes :
6662 - ./redis/redis.conf:/etc/redis/redis.conf:ro
6763 - ./redis/tls:/etc/redis/tls:ro
Original file line number Diff line number Diff line change 11FROM python:3.12-slim
22
3+ # Install system dependencies
4+ RUN apt-get update && apt-get install -y \
5+ openssh-client \
6+ && rm -rf /var/lib/apt/lists/*
7+
8+ # Create SSH config directory
9+ RUN mkdir -p /root/.ssh
10+
311WORKDIR /app
412
513RUN pip3 install --no-cache-dir --upgrade pip
614
715COPY . .
16+
17+ # Copy SSH configuration file
18+ COPY docker/ssh_config /root/.ssh/config
19+ RUN chmod 600 /root/.ssh/config
20+
821RUN pip3 install --no-cache-dir -e "."
922
1023CMD ["python3" , "worker.py" , "fifo" ]
Original file line number Diff line number Diff line change 11FROM python:3.12-slim
22
3+ # Install system dependencies
4+ RUN apt-get update && apt-get install -y \
5+ openssh-client \
6+ && rm -rf /var/lib/apt/lists/*
7+
8+ # Create SSH config directory
9+ RUN mkdir -p /root/.ssh
10+
311WORKDIR /app
412
513RUN pip3 install --no-cache-dir --upgrade pip
614
715COPY . .
16+
17+ # Copy SSH configuration file
18+ COPY docker/ssh_config /root/.ssh/config
19+ RUN chmod 600 /root/.ssh/config
20+
821RUN pip3 install --no-cache-dir -e "."
922
1023CMD ["python3" , "worker.py" , "node" ]
Original file line number Diff line number Diff line change 1+ # SSH configuration - Enable ssh-rsa algorithm globally for legacy device compatibility
2+ Host *
3+ PubkeyAcceptedKeyTypes + ssh-rsa
4+ HostKeyAlgorithms + ssh-rsa
5+ PubkeyAcceptedAlgorithms + ssh-rsa
Original file line number Diff line number Diff line change @@ -108,9 +108,10 @@ def settings_customise_sources(
108108 dotenv_settings ,
109109 file_secret_settings ,
110110 ):
111- """Read settings: env -> yaml -> default"""
111+ """Read settings: env -> dotenv -> yaml -> default"""
112112 return (
113113 env_settings ,
114+ dotenv_settings ,
114115 YamlConfigSettingsSource (settings_cls ),
115116 init_settings ,
116117 )
You can’t perform that action at this time.
0 commit comments