Merge pull request #9 from recklessop/main
@@ -0,0 +1,7 @@
|
||||
FROM python:3.9.18-alpine
|
||||
COPY /app /app
|
||||
WORKDIR /app
|
||||
RUN pip install -r requirements.txt
|
||||
EXPOSE 5000
|
||||
ENTRYPOINT [ "python" ]
|
||||
CMD [ "portable.py" ]
|
||||
@@ -12,15 +12,38 @@ It pretends to be GoogleBot (Google's web crawler) and gets the same content tha
|
||||
|
||||
## How do I use it?
|
||||
|
||||
First make sure you have [python](https://python.org) installed on your machine, then go to a terminal (`Command Prompt` on Windows, `Terminal` on Mac) and run the following command:
|
||||
### Using Docker
|
||||
|
||||
Requirements:
|
||||
- docker
|
||||
- docker-compose
|
||||
|
||||
First, clone the repo to your machine, then run the following commands:
|
||||
|
||||
```sh
|
||||
python -m pip install flask
|
||||
git clone https://github.com/wasi-master/13ft.git
|
||||
cd 13ft
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
### Standard Python script
|
||||
|
||||
First, make sure you have [python](https://python.org) installed on your machine. Next, clone the git repo. Then go to a terminal (`Command Prompt` on Windows, `Terminal` on Mac) and run the following command:
|
||||
|
||||
From the git cloned directory on your computer:
|
||||
|
||||
```sh
|
||||
cd app/
|
||||
python -m pip install -r requirements.txt
|
||||
```
|
||||
|
||||
If that doesn't work retry but replace `python` with `py`, then try `python3`, then try `py3`
|
||||
|
||||
Then download the file `portable.py` and run it, click [this link](https://realpython.com/run-python-scripts/) for a tutorial on how to run python scripts
|
||||
Then run `portable.py`, click [this link](https://realpython.com/run-python-scripts/) for a tutorial on how to run python scripts.
|
||||
|
||||
```sh
|
||||
python portable.py
|
||||
```
|
||||
|
||||
Then follow these simple steps
|
||||
|
||||
|
||||
@@ -130,4 +130,4 @@ def get_article(path):
|
||||
return "Invalid URL", 400
|
||||
|
||||
|
||||
app.run(debug=False)
|
||||
app.run(host='0.0.0.0', port=5000, debug=False)
|
||||
@@ -0,0 +1 @@
|
||||
flask
|
||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 9.9 MiB After Width: | Height: | Size: 9.9 MiB |
@@ -0,0 +1,7 @@
|
||||
version: '3'
|
||||
services:
|
||||
13ft:
|
||||
build: .
|
||||
#image: your-image-name:tag
|
||||
ports:
|
||||
- "5000:5000"
|
||||