mirror of
https://github.com/ryanamay/sparkle.git
synced 2024-09-20 02:40:35 +00:00
Merge branch 'main' of https://github.com/ryanamay/sparkle
This commit is contained in:
commit
39f67b45de
2 changed files with 14 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
|||
|
||||
# base layer
|
||||
FROM python:3.12-alpine as base
|
||||
# create a venv
|
||||
|
||||
|
||||
ARG DEV=false
|
||||
|
||||
ENV VIRTUAL_ENV=/sparkle/.venv \
|
||||
PATH="/sparkle/.venv/bin:$PATH"
|
||||
|
@ -26,6 +30,7 @@ RUN pip install poetry==1.8.3
|
|||
|
||||
# Install the app
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
|
||||
RUN poetry install --no-root && rm -rf $POETRY_CACHE_DIR;
|
||||
|
||||
FROM base as runtime
|
||||
|
@ -34,5 +39,6 @@ COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
|
|||
|
||||
COPY app ./app
|
||||
|
||||
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
|
|
|
@ -6,4 +6,11 @@ services:
|
|||
dockerfile: Dockerfile
|
||||
environment: # use .env
|
||||
- FINNHUB_API_KEY=${FINNHUB_API_KEY}
|
||||
restart: unless-stopped
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- yanacloud
|
||||
|
||||
networks:
|
||||
yanacloud:
|
||||
external: true
|
||||
name: yanacloud
|
||||
|
|
Loading…
Reference in a new issue