Added gitea ci.
This commit is contained in:
		
							
								
								
									
										30
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								Dockerfile
									
									
									
									
									
								
							@ -1,16 +1,24 @@
 | 
			
		||||
FROM python:3.9.6-slim-buster
 | 
			
		||||
FROM python:3.9-bookworm
 | 
			
		||||
 | 
			
		||||
RUN pip install poetry==1.5.1
 | 
			
		||||
COPY --from=ghcr.io/astral-sh/uv:0.7.19 /uv /uvx /bin/
 | 
			
		||||
 | 
			
		||||
ENV PATH="${PATH}:/home/lenochka/.poetry/bin:/home/lenochka/.local/bin"
 | 
			
		||||
ENV UV_COMPILE_BYTECODE=1
 | 
			
		||||
ENV UV_LINK_MODE=copy
 | 
			
		||||
ENV UV_PROJECT_ENVIRONMENT=/usr/local/
 | 
			
		||||
 | 
			
		||||
# Installing requirements
 | 
			
		||||
RUN poetry config virtualenvs.create false
 | 
			
		||||
COPY pyproject.toml poetry.lock /home/lenochka/app/
 | 
			
		||||
WORKDIR /home/lenochka/app/
 | 
			
		||||
RUN poetry install --only main
 | 
			
		||||
# Copying requirements of a project
 | 
			
		||||
WORKDIR /app/src
 | 
			
		||||
 | 
			
		||||
COPY . /home/lenochka/app/src/
 | 
			
		||||
RUN poetry install --only main
 | 
			
		||||
RUN --mount=from=ghcr.io/astral-sh/uv,source=/uv,target=/bin/uv \
 | 
			
		||||
    --mount=type=cache,target=/root/.cache/uv \
 | 
			
		||||
    --mount=type=bind,source=uv.lock,target=uv.lock \
 | 
			
		||||
    --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
 | 
			
		||||
    uv sync --locked --no-install-project --no-dev
 | 
			
		||||
 | 
			
		||||
CMD "lenochka_wake_up"
 | 
			
		||||
ADD . .
 | 
			
		||||
 | 
			
		||||
RUN --mount=from=ghcr.io/astral-sh/uv,source=/uv,target=/bin/uv \
 | 
			
		||||
    --mount=type=cache,target=/root/.cache/uv \
 | 
			
		||||
    uv sync --locked --no-dev
 | 
			
		||||
 | 
			
		||||
CMD ["lenochka_wake_up"]
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user