-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 734 Bytes
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 734 Bytes
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
FROM python:3.12-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY *.py .
COPY templates/ templates/
# Create directories for volumes
RUN mkdir -p /app/config /data/db
# Set default config if none exists
COPY aurora_config.json /app/config/
# Set volumes for persistent storage
VOLUME /app/config
VOLUME /data/db
# Set environment variables
ENV DB_PATH=/data/db/aurora_data.db
ENV CONFIG_FILE=/app/config/aurora_config.json
ENV INVERTER_HOST=192.168.1.100
ENV INVERTER_PORT=8899
ENV WEB_HOST=0.0.0.0
ENV WEB_PORT=5000
ENV POLLING_INTERVAL=300
# Expose web port
EXPOSE 5000
# Run the application
CMD ["python", "aurora_web_app.py"]