Merge 3eb8cd06f9ebd7877ac0cd964e63be8f178e3558 into 20c2a7d1bf240ae7bdca0951cd16f14b3a021356

This commit is contained in:
ellwoodb 2024-07-26 15:38:53 +02:00 committed by GitHub
commit 672d7329df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 54 additions and 2 deletions

10
app/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM python:3.10
WORKDIR /stocknear-backend
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["uvicorn", "main:app", "--reload"]

View File

@ -25,7 +25,7 @@ prophet
nbformat nbformat
nbconvert nbconvert
nbclient nbclient
schedule schedule==1.2.1
pocketbase pocketbase
quantstats quantstats
ipython ipython
@ -36,4 +36,5 @@ faker
finnhub-python finnhub-python
intrinio_sdk intrinio_sdk
openai openai
slowapi slowapi
orjson

33
docker-compose.yml Normal file
View File

@ -0,0 +1,33 @@
services:
# Still need to import .db files and json folder (see Discord) manually.
app-backend:
image: stocknear/app-backend
build: ./app
ports:
- 8000:8000
depends_on:
- redis
fastify-backend:
image: stocknear/fastify-backend
build: ./fastify
ports:
- 2000:2000
environment:
- FMP_API_KEY=""
- MIXPANEL_API_KEY="" # If this is not set to a valid value the app will crash. You can comment out l. 25 and l. 58 in fastify/app.js to get it to work.
- TWITCH_API_KEY=""
- TWITCH_SECRET_KEY=""
depends_on:
- pocketbase
redis:
image: redis:6.2-alpine
ports:
- '6379:6379'
# UNOFFICIAL IMAGE! To do it correctly either set up local instance or make own Dockerfile until official Docker Image is out.
# Still need to import schema.json manually. Is there an automated way?
pocketbase:
image: ghcr.io/muchobien/pocketbase:latest
ports:
- "8090:8090"
volumes:
- ./pocketbase_data:/pb_data

8
fastify/Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM node:20-alpine
WORKDIR /stocknear-backend
COPY . .
RUN npm install
CMD ["npm", "run", "start"]