Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
superDross committed Sep 16, 2024
1 parent f5c1346 commit 8cd0ee5
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 5 deletions.
47 changes: 47 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.git/
.pytest_cache/
.tox/
.coverage
.gitignore
*.pyc
*.pyo
*.pyd
*.swp
*.swo
*~
*.orig
*.egg
._*
*.log
.DS_Store
pip-log.txt
build/*
dist/*
tmp/*
.tmp/*
env/*
_build/*
*results.xml
.vagrant
.idea
.cache
*.mo
EGG-INFO
.eggs/
.coverage
*settings.yaml
local-settings.yaml
simulate_metadata_event.py
simulate_completes_event.py
scripts/*.json
capn.egg-info/*
.tox/*
.pytest_cache/
htmlcov/*
tags
venv/
/capn_release.html
*egg-info/
TODO
volumes/
Makefile
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# docker build -t manga .
# docker run manga

FROM python:3.8-slim-bullseye


WORKDIR /app
COPY . /app

ENV PYTHONPATH=/app

RUN apt-get update \
&& apt-get -y --no-install-recommends install gcc libxml2-dev libxslt-dev python3-dev python3-lxml \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*


RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r dev-requirements.txt

# ENTRYPOINT ["python3", "scraper/"]
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

build:
docker build -t manga:latest .

run:
docker run -v $(PWD):/app -p 4444:4444 --rm manga:latest python3 scraper/ $(ARGS)

test:
docker run -v $(PWD):/app --rm manga:latest python3 -m pytest tests/
10 changes: 5 additions & 5 deletions docs/web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ sources: <manga-sources> LIST[STR]

Response:

```json
```
[
{
'title': 'dragonball',
Expand All @@ -48,7 +48,7 @@ source: <name-source-to-download-from> STR

Using pre-signed S3 URLS allows us to keep the S3 bucket private and time limit the URLs access

```json
```
[
{
'title': 'dragonball',
Expand All @@ -67,7 +67,7 @@ As we have no relational data we can just store the information in a NoSQL datab

One database, one collection (`mangas`) with all documents:

```json
```
{
'title': 'dragonball',
'volume': 98,
Expand Down Expand Up @@ -98,7 +98,7 @@ Save password hashes to DB

- Response:

```json
```
{
"success": true,
"message": "successfully registered"
Expand All @@ -120,7 +120,7 @@ POST /v1/login

- Response:

```json
```
{
'token': <token>
}
Expand Down

0 comments on commit 8cd0ee5

Please sign in to comment.