docker
This commit is contained in:
parent
1b6de48357
commit
6ec38ac388
20
Dockerfile
20
Dockerfile
|
@ -8,18 +8,22 @@ ENV POETRY_CACHE_DIR=/opt/.cache
|
||||||
|
|
||||||
# Install poetry separated from system interpreter
|
# Install poetry separated from system interpreter
|
||||||
RUN python3 -m venv $POETRY_VENV \
|
RUN python3 -m venv $POETRY_VENV \
|
||||||
&& $POETRY_VENV/bin/pip install -U pip setuptools \
|
&& $POETRY_VENV/bin/pip install -U pip setuptools \
|
||||||
&& $POETRY_VENV/bin/pip install poetry==${POETRY_VERSION}
|
&& $POETRY_VENV/bin/pip install poetry==${POETRY_VERSION}
|
||||||
|
|
||||||
# Add `poetry` to PATH
|
# Add `poetry` to PATH
|
||||||
ENV PATH="${PATH}:${POETRY_VENV}/bin"
|
ENV PATH="${PATH}:${POETRY_VENV}/bin"
|
||||||
|
|
||||||
WORKDIR /app
|
ENV WORKING_DIR=/app
|
||||||
|
|
||||||
|
# Set the working directory to /app
|
||||||
|
WORKDIR ${WORKING_DIR}
|
||||||
|
|
||||||
|
# Copy the project to the container
|
||||||
|
COPY . ${WORKING_DIR}
|
||||||
|
# COPY .env ${WORKING_DIR}
|
||||||
|
COPY pyproject.toml .
|
||||||
|
|
||||||
# Install dependencies
|
|
||||||
COPY poetry.lock pyproject.toml ./
|
|
||||||
RUN poetry install
|
RUN poetry install
|
||||||
|
|
||||||
# Run your app
|
CMD poetry run uvicorn app.main:app --host 0.0.0.0 --port 80
|
||||||
COPY . /app
|
|
||||||
CMD [ "poetry", "run", "python", "uvicorn app.main:app --reload" ]
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
build:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
environment:
|
||||||
|
- WEBHOOK='https://crm.svs-tech.pro/rest/1/liljl5r1k6dtxt0s/'
|
||||||
|
ports:
|
||||||
|
- 8099:80
|
|
@ -4,13 +4,13 @@ version = "0.1.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["aarizona <ar.ariz.arizona@gmail.com>"]
|
authors = ["aarizona <ar.ariz.arizona@gmail.com>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
package-mode = false
|
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.10"
|
python = "^3.10"
|
||||||
fastapi = "^0.110.3"
|
fastapi = "^0.110.3"
|
||||||
uvicorn = "^0.29.0"
|
uvicorn = "^0.29.0"
|
||||||
python-dotenv = "^1.0.1"
|
python-dotenv = "^1.0.1"
|
||||||
|
requests = "^2.31.0"
|
||||||
|
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
|
|
Loading…
Reference in New Issue