rolled back changes regarding scripts
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,24 +1,16 @@
|
||||
FROM python:3.14-slim
|
||||
|
||||
# Copy application files
|
||||
WORKDIR /config
|
||||
COPY scripts ./scripts
|
||||
WORKDIR /app
|
||||
COPY config.py .
|
||||
COPY flairtimercomment.py .
|
||||
|
||||
# Add execute permissions to the scripts
|
||||
RUN chmod +x /config/scripts/start_bot.sh
|
||||
RUN chmod +x /config/scripts/autorun.sh
|
||||
RUN chmod +x /config/scripts/copy.sh
|
||||
|
||||
# Create App directory
|
||||
RUN mkdir /app
|
||||
# Install dependencies
|
||||
RUN pip install --no-cache-dir praw
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Run the script
|
||||
CMD ["sh", "/config/scripts/autorun.sh"]
|
||||
CMD ["python", "flairtimercomment.py"]
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
/config/scripts/copy.sh && /config/scripts/start_bot.sh
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set the source and destination directories
|
||||
source_dir=/app
|
||||
destination_dir=/config
|
||||
|
||||
# Get a list of files in the source directory
|
||||
files=$(ls "$source_dir")
|
||||
|
||||
# Loop through the list of files
|
||||
for file in $files
|
||||
do
|
||||
# Check if the file exists in the destination directory
|
||||
if [ ! -f "$destination_dir/$file" ]; then
|
||||
# If the file does not exist, copy it to the destination directory
|
||||
cp "$source_dir/$file" "$destination_dir/$file"
|
||||
echo "Copied $file to $destination_dir"
|
||||
else
|
||||
echo "$file already exists in $destination_dir"
|
||||
fi
|
||||
done
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
python3 app/flairtimercomment.py
|
||||
Reference in New Issue
Block a user