Initial commit: add Modbus slave simulator
- TCP/RTU/TLS server support with pymodbus - Configurable data store sizes and initial values - CLI with argument parsing for port, slave-id, etc. - GitHub Actions CI/CD for Docker build and push
This commit is contained in:
5 files changed
+295
No files matched your search
+18
@@ -0,0 +1,18 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN pip install uv && uv sync --frozen
|
||||
|
||||
# Copy application
|
||||
COPY main.py ./
|
||||
|
||||
# Create non-root user
|
||||
RUN useradd -m modbus && chown -R modbus:modbus /app
|
||||
USER modbus
|
||||
|
||||
EXPOSE 5020
|
||||
|
||||
CMD ["python", "main.py"]
|
||||
Reference in new issue
Block a user