-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add seperate docker container for firehose
- Loading branch information
1 parent
6d984be
commit 396f8c0
Showing
9 changed files
with
76 additions
and
12 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
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,16 @@ | ||
FROM python:3.12.8-slim-bookworm | ||
|
||
# create a volume for the sqlite database, so that it persists between container restarts | ||
# need persistent storage attached to server | ||
VOLUME /var/data/ | ||
WORKDIR /usr/src/app/ | ||
|
||
# Copy package files and install dependencies | ||
COPY ../requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy the rest of the application code | ||
COPY . . | ||
|
||
# Runs when the container is started | ||
CMD python start_stream.py |
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,4 @@ | ||
atproto | ||
peewee | ||
python-dotenv | ||
apscheduler |
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,27 @@ | ||
import os | ||
from utils.logger import logger | ||
|
||
SERVICE_DID = os.environ.get('SERVICE_DID', None) | ||
HOSTNAME = os.environ.get('HOSTNAME', None) | ||
HANDLE = os.environ.get('HANDLE', None) | ||
PASSWORD = os.environ.get('PASSWORD', None) | ||
|
||
if HOSTNAME is None: | ||
raise RuntimeError('You should set "HOSTNAME" environment variable first.') | ||
|
||
if SERVICE_DID is None: | ||
SERVICE_DID = f'did:web:{HOSTNAME}' | ||
|
||
|
||
CHRONOLOGICAL_TRENDING_URI = os.environ.get('CHRONOLOGICAL_TRENDING_URI') | ||
if CHRONOLOGICAL_TRENDING_URI is None: | ||
raise RuntimeError('Publish your feed first (run publish_feed.py) to obtain Feed URI. ' | ||
'Set this URI to "CHRONOLOGICAL_TRENDING_URI" environment variable.') | ||
|
||
# logger.info(f'HANDLE: {HANDLE}') | ||
# logger.info(f'PASSWORD: {PASSWORD}') | ||
if HANDLE is None: | ||
raise RuntimeError('You should set "HANDLE" environment variable first.') | ||
|
||
if PASSWORD is None: | ||
raise RuntimeError('You should set "PASSWORD" environment variable first.') |
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,4 @@ | ||
import logging | ||
|
||
logger = logging.getLogger(__name__) | ||
logging.basicConfig(level=logging.INFO) |