- Fix Docker path

This commit is contained in:
nwithan8 2023-12-09 01:05:13 -07:00
parent 1b826b24d8
commit f9fdc7f640
3 changed files with 18 additions and 15 deletions

View File

@ -12,8 +12,11 @@ COPY requirements.txt requirements.txt
# Install Python requirements # Install Python requirements
RUN pip3 install --no-cache-dir -r requirements.txt RUN pip3 install --no-cache-dir -r requirements.txt
# Make Docker /config volume for optional config file
VOLUME /config
# Copy config file from build machine to Docker /config folder # Copy config file from build machine to Docker /config folder
COPY config.yaml* / COPY config.yaml* /config/
# Make Docker /logs volume for log file # Make Docker /logs volume for log file
VOLUME /logs VOLUME /logs

View File

@ -95,9 +95,9 @@ docker run -d \
#### Paths and Environment Variables #### Paths and Environment Variables
| Path | Description | | Path | Description |
|---------|-------------------------------------------------------------------| |-----------|-----------------------------------------------------------------------|
| `/` | Path to config files (`config.yaml` should be in this directory) | | `/config` | Path to config directory (`config.yaml` should be in this directory) |
| `/logs` | Path to log files (`Plex Prerolls.log` will be in this directory) | | `/logs` | Path to log directory (`Plex Prerolls.log` will be in this directory) |
| Environment Variable | Description | | Environment Variable | Description |
|----------------------|-------------------------------------------------------------------| |----------------------|-------------------------------------------------------------------|

View File

@ -21,7 +21,7 @@ echo "Dry run flag: $DRY_RUN_FLAG"
# Schedule cron job with supplied cron schedule # Schedule cron job with supplied cron schedule
echo "Scheduling cron job" echo "Scheduling cron job"
echo "$CRON_SCHEDULE python3 /run.py -c /config.yaml -l /logs $DRY_RUN_FLAG > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/schedule_preroll echo "$CRON_SCHEDULE python3 /run.py -c /config/config.yaml -l /logs $DRY_RUN_FLAG > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/schedule_preroll
# Give execution rights on the cron job # Give execution rights on the cron job
chmod 0644 /etc/cron.d/schedule_preroll chmod 0644 /etc/cron.d/schedule_preroll