-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Drop NSE Endpoint Support and Migrate to Screener.in for Data…
… Toolkit"
- Loading branch information
Showing
14 changed files
with
4,134 additions
and
1,009 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
FROM python:3.9-slim | ||
|
||
RUN apt-get update && apt-get install -y redis-server && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY redis.conf /etc/redis/redis.conf | ||
COPY entrypoint.sh /usr/local/bin/ | ||
COPY shutdown.sh /usr/local/bin/ | ||
|
||
VOLUME /redis-cache | ||
|
||
WORKDIR /app | ||
|
||
COPY pyproject.toml poetry.lock /app/ | ||
|
||
RUN pip install --no-cache-dir poetry && \ | ||
poetry config virtualenvs.create false && \ | ||
poetry install --only main | ||
poetry install --no-dev | ||
|
||
COPY . . | ||
|
||
EXPOSE 8000 | ||
EXPOSE 6379 | ||
|
||
ENV REDIS_HOST=localhost | ||
ENV REDIS_PORT=6379 | ||
|
||
WORKDIR /app/fin_maestro_kin | ||
|
||
CMD ["poetry", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] | ||
RUN chmod +x /usr/local/bin/entrypoint.sh /usr/local/bin/shutdown.sh | ||
|
||
RUN touch /var/log/redis/redis-server.log && chown redis:redis /var/log/redis/redis-server.log | ||
|
||
ENTRYPOINT ["bash", "/usr/local/bin/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
cd /app/fin_maestro_kin | ||
redis-server /etc/redis/redis.conf | ||
poetry run uvicorn main:app --host 0.0.0.0 --port 8000 | ||
bash /usr/local/bin/shutdown.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .nse import * |
Empty file.
Oops, something went wrong.