mirror of
https://github.com/Rongronggg9/SlashBot.git
synced 2025-02-06 09:13:29 +08:00
Dockerfile: bump python from 3.7-slim to 3.9-slim
This commit is contained in:
parent
8b10984629
commit
7523de8ee8
@ -1,16 +1,9 @@
|
||||
# Use an official Python runtime as a parent image
|
||||
FROM python:3.7-slim
|
||||
FROM python:3.9-slim
|
||||
|
||||
# Set the working directory to /app
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the current directory contents into the container at /app
|
||||
COPY . /app
|
||||
|
||||
# Install any needed packages specified in requirements.txt
|
||||
RUN pip install --trusted-host pypi.python.org -r /app/requirements.txt
|
||||
# Define environment variable
|
||||
ENV TOKEN X
|
||||
|
||||
# Run app.py when the container launches
|
||||
CMD ["python", "-u", "SlashBot.py"]
|
@ -13,12 +13,11 @@ escaping = ('\\ ', '\\ ')
|
||||
markdownEscape = lambda s: s.replace("_", "\\_").replace("*", "\\*").replace("[", "\\[").replace("`", "\\`")
|
||||
|
||||
# Docker env
|
||||
if os.environ.get('TOKEN') and os.environ['TOKEN'] != 'X':
|
||||
Token = os.environ['TOKEN']
|
||||
else:
|
||||
Token = os.environ.get('TOKEN')
|
||||
if not Token:
|
||||
raise Exception('no token')
|
||||
|
||||
if os.environ.get('PROXY') and os.environ['PROXY'] != 'X':
|
||||
if os.environ.get('PROXY'):
|
||||
telegram_proxy = os.environ['PROXY']
|
||||
requests_proxies = {'all': os.environ['PROXY']}
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user