dockerfile.dev
This commit is contained in:
@@ -8,7 +8,7 @@ RUN adduser -u 5678 --disabled-password --gecos "" appuser
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
|
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
|
||||||
COPY --chown=appuser:appuser eveal /app
|
COPY --chown=appuser:appuser eveal /app/eveal
|
||||||
|
|
||||||
USER appuser
|
USER appuser
|
||||||
CMD ["uvicorn", "eveal.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
CMD ["uvicorn", "eveal.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||||
24
Dockerfile.dev
Normal file
24
Dockerfile.dev
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
FROM python:3.11-slim as sde_import
|
||||||
|
WORKDIR /app
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
|
||||||
|
COPY --chown=appuser:appuser eveal /app/eveal
|
||||||
|
COPY --chown=appuser:appuser static_eve /app/static_eve
|
||||||
|
COPY --chown=appuser:appuser import_sde.py /app/import_sde.py
|
||||||
|
RUN python import_sde.py
|
||||||
|
|
||||||
|
FROM python:3.11-slim
|
||||||
|
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
||||||
|
RUN adduser -u 5678 --disabled-password --gecos "" appuser
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=sde_import --chown=appuser:appuser /app/sde.db /app/sde.db
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
|
||||||
|
COPY --chown=appuser:appuser eveal /app/eveal
|
||||||
|
|
||||||
|
USER appuser
|
||||||
|
CMD ["uvicorn", "eveal.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||||
@@ -21,7 +21,7 @@ async def root():
|
|||||||
|
|
||||||
|
|
||||||
@app.post("/reprocess/")
|
@app.post("/reprocess/")
|
||||||
async def reprocess(ep_items: Evepraisal, ep_mat: Evepraisal, efficiency: float = .55, sde: Session = Depends(get_sde_session)):
|
async def reprocess(ep_items: Evepraisal, ep_mat: Evepraisal, efficiency: float = .55, sde: Session = Depends(get_sde_session)) -> List[PriceReprocess]:
|
||||||
matprices = {item.typeID: {'sell': item.prices.sell.min, 'buy': item.prices.buy.max} for item in ep_mat.items}
|
matprices = {item.typeID: {'sell': item.prices.sell.min, 'buy': item.prices.buy.max} for item in ep_mat.items}
|
||||||
|
|
||||||
item_reprocess: List[PriceReprocess] = []
|
item_reprocess: List[PriceReprocess] = []
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ class MarketGroup(SQLModel, table=True):
|
|||||||
class Type(SQLModel, table=True):
|
class Type(SQLModel, table=True):
|
||||||
id: int = Field(primary_key=True)
|
id: int = Field(primary_key=True)
|
||||||
|
|
||||||
# id = Column(Integer, primary_key=True, index=True)
|
|
||||||
group_id: Optional[int] = Field(default=None, foreign_key="group.id")
|
group_id: Optional[int] = Field(default=None, foreign_key="group.id")
|
||||||
group: Optional[Group] = Relationship(back_populates="types")
|
group: Optional[Group] = Relationship(back_populates="types")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user