This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -19,9 +19,10 @@ COPY *config.json ./
|
||||
# Create output directories
|
||||
RUN mkdir -p /app/snapshots /app/logs
|
||||
|
||||
# Copy scheduler script
|
||||
# Copy scripts
|
||||
COPY scheduler.sh ./
|
||||
RUN chmod +x scheduler.sh
|
||||
COPY startup.sh ./
|
||||
RUN chmod +x scheduler.sh startup.sh
|
||||
|
||||
# Copy cron configuration
|
||||
COPY crontab /etc/cron.d/parentzone-downloader
|
||||
@@ -35,8 +36,11 @@ RUN touch /var/log/cron.log
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONPATH=/app
|
||||
|
||||
# Expose port for web server
|
||||
EXPOSE 8080
|
||||
|
||||
# Expose volume for persistent data
|
||||
VOLUME ["/app/snapshots", "/app/logs", "/app/parentzone_images"]
|
||||
|
||||
# Start cron and keep container running
|
||||
CMD ["sh", "-c", "cron && tail -f /var/log/cron.log"]
|
||||
# Start all services using startup script
|
||||
CMD ["./startup.sh"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version: '3.8'
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
parentzone-downloader:
|
||||
@@ -18,10 +18,9 @@ services:
|
||||
- ./logs:/app/logs
|
||||
# Mount your config file
|
||||
- ./config.json:/app/config.json:ro
|
||||
ports:
|
||||
- "8080:8080"
|
||||
restart: unless-stopped
|
||||
# Optional: expose a port if you want to add a web interface later
|
||||
# ports:
|
||||
# - "8080:8080"
|
||||
|
||||
volumes:
|
||||
snapshots:
|
||||
|
||||
Reference in New Issue
Block a user