This commit is contained in:
parent
a760d253b3
commit
1e922e3161
23
Dockerfile
23
Dockerfile
|
@ -1,12 +1,25 @@
|
||||||
FROM python:alpine
|
FROM python:alpine
|
||||||
|
|
||||||
|
# Update package lists and install necessary dependencies
|
||||||
|
RUN apk update && \
|
||||||
|
apk add --no-cache build-base icu-data-full curl python3-dev musl-dev postgresql-dev postgresql-client && \
|
||||||
|
curl -sSL https://install.python-poetry.org | python
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy just the dependency manifests first
|
||||||
|
COPY poetry.lock pyproject.toml /app/
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN poetry config virtualenvs.create false && \
|
||||||
|
poetry install --no-dev
|
||||||
|
|
||||||
|
# Copy the rest of the application
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache build-base icu-data-full curl python3-dev musl-dev postgresql-dev postgresql-client
|
# Expose the port
|
||||||
RUN curl -sSL https://install.python-poetry.org | python
|
|
||||||
ENV PATH="${PATH}:/root/.local/bin"
|
|
||||||
RUN poetry config virtualenvs.create false && poetry install --only main
|
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
|
# Command to run the application
|
||||||
CMD ["python", "server.py"]
|
CMD ["python", "server.py"]
|
||||||
|
|
|
@ -35,7 +35,7 @@ build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
multi_line_output = 3
|
multi_line_output = 3
|
||||||
include_trailing_comma = true
|
include_trailing_comma = false
|
||||||
force_grid_wrap = 0
|
force_grid_wrap = 0
|
||||||
use_parentheses = true
|
use_parentheses = true
|
||||||
ensure_newline_before_comments = true
|
ensure_newline_before_comments = true
|
||||||
|
|
|
@ -91,3 +91,4 @@ class Base(declarative_base()):
|
||||||
|
|
||||||
|
|
||||||
make_searchable(Base.metadata)
|
make_searchable(Base.metadata)
|
||||||
|
Base.metadata.create_all(engine)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user