refactor: imporved layer caching for dockerfile
using existing built image for account 2
This commit is contained in:
@@ -1 +1,11 @@
|
|||||||
.unused
|
.unused
|
||||||
|
Downloads
|
||||||
|
.venv
|
||||||
|
volumes
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
my_account.session
|
||||||
|
.gitignore
|
||||||
|
README.md
|
||||||
|
.git
|
||||||
|
uv.lock
|
||||||
+16
-8
@@ -1,10 +1,18 @@
|
|||||||
FROM python:3.11
|
FROM python:3.11-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
git wget ffmpeg mediainfo && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY requirements.txt /app/
|
||||||
|
|
||||||
|
RUN python -m pip install --no-cache-dir --upgrade pip && \
|
||||||
|
python -m pip install --no-cache-dir -r /app/requirements.txt
|
||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN apt-get -qq update && apt-get -qq install -y git wget ffmpeg mediainfo\
|
|
||||||
&& apt-get clean \
|
ENV PYTHONUNBUFFERED=1
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
RUN python -m venv --copies /opt/venv
|
CMD ["python", "-u", "main.py"]
|
||||||
ENV PATH="/opt/venv/bin:$PATH"
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
CMD ["python", "main.py"]
|
|
||||||
@@ -3,6 +3,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
image: userbot:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
@@ -16,9 +17,7 @@ services:
|
|||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
|
|
||||||
anna:
|
anna:
|
||||||
build:
|
image: userbot:latest
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "userbot"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Add your description here"
|
description = "Add your description here"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.13"
|
requires-python = ">=3.11"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aiofiles>=25.1.0",
|
"aiofiles>=25.1.0",
|
||||||
"aiohttp>=3.13.2",
|
"aiohttp>=3.13.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user