mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
improve Dockerfile
This commit is contained in:
+9
-6
@@ -1,14 +1,10 @@
|
||||
FROM python:3.12-slim-bullseye
|
||||
|
||||
LABEL maintainer="admin@yoursfunny.top"
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
RUN set -eux; \
|
||||
apt-get update; \
|
||||
apt-get install -y gosu; \
|
||||
@@ -16,6 +12,13 @@ RUN set -eux; \
|
||||
# verify that the binary works
|
||||
gosu nobody true
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt /app
|
||||
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
|
||||
|
||||
COPY . /app
|
||||
|
||||
RUN chmod a+x docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
|
||||
@@ -17,6 +17,6 @@ services:
|
||||
WEBHOOK_CERT: './cert/cert.pem'
|
||||
WEBHOOK_SECRET_TOKEN: 'secret-token'
|
||||
# LOG_LEVEL: 'WARNING'
|
||||
volumes:
|
||||
- ./cert:/app/cert
|
||||
# volumes:
|
||||
# - ./cert:/app/cert
|
||||
container_name: tgxmb
|
||||
|
||||
Reference in New Issue
Block a user