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
|
FROM python:3.12-slim-bullseye
|
||||||
|
|
||||||
|
LABEL maintainer="admin@yoursfunny.top"
|
||||||
|
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
ENV PYTHONUNBUFFERED=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; \
|
RUN set -eux; \
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
apt-get install -y gosu; \
|
apt-get install -y gosu; \
|
||||||
@@ -16,6 +12,13 @@ RUN set -eux; \
|
|||||||
# verify that the binary works
|
# verify that the binary works
|
||||||
gosu nobody true
|
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
|
RUN chmod a+x docker-entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ services:
|
|||||||
WEBHOOK_CERT: './cert/cert.pem'
|
WEBHOOK_CERT: './cert/cert.pem'
|
||||||
WEBHOOK_SECRET_TOKEN: 'secret-token'
|
WEBHOOK_SECRET_TOKEN: 'secret-token'
|
||||||
# LOG_LEVEL: 'WARNING'
|
# LOG_LEVEL: 'WARNING'
|
||||||
volumes:
|
# volumes:
|
||||||
- ./cert:/app/cert
|
# - ./cert:/app/cert
|
||||||
container_name: tgxmb
|
container_name: tgxmb
|
||||||
|
|||||||
Reference in New Issue
Block a user