mirror of
https://github.com/zebrajr/imdbscrapper.git
synced 2026-01-15 12:15:12 +00:00
Added basic file layout, dockerfile and docker-compose.yml
This commit is contained in:
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM python:3.9-alpine3.13
|
||||
|
||||
WORKDIR /opt/imdbscrapper
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY src/ .
|
||||
|
||||
CMD ["python", "-u", "/opt/imdbscrapper/scrapper.py"]
|
||||
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
version: '3'
|
||||
services:
|
||||
tornStocks:
|
||||
container_name: imdbscrapper
|
||||
image: zebrajr/imdbscrapper:latest
|
||||
#ports:
|
||||
# - '80:8080'
|
||||
# - '443:8443'
|
||||
volumes:
|
||||
- '${PWD}/src:/opt/imdbscrapper:ro'
|
||||
|
||||
#web:
|
||||
# build: .
|
||||
# command: python manage.py runserver 0.0.0.0:8000
|
||||
# ports:
|
||||
# - "8000:8000"
|
||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
beautifulsoup4
|
||||
requests
|
||||
20
src/scrapper.py
Normal file
20
src/scrapper.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
import time
|
||||
import json
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
def cls():
|
||||
os.system('cls' if os.name=='nt' else 'clear')
|
||||
|
||||
def main():
|
||||
cls()
|
||||
print("Hey2")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user