mirror of https://github.com/CIRCL/lookyloo
fix: docker-compose should now work.
parent
d83252930d
commit
cfa300082f
24
Dockerfile
24
Dockerfile
|
@ -4,18 +4,20 @@ ENV LANG=C.UTF-8
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get -y upgrade
|
RUN apt-get -y upgrade
|
||||||
RUN apt-get -y install git wget python3-pip
|
RUN apt-get -y install wget python3-pip nodejs git
|
||||||
RUN pip3 install pipenv
|
RUN pip3 install pipenv
|
||||||
|
|
||||||
WORKDIR root_lookyloo
|
|
||||||
|
|
||||||
RUN git clone https://github.com/CIRCL/lookyloo.git
|
|
||||||
WORKDIR lookyloo
|
WORKDIR lookyloo
|
||||||
RUN sed -i "s/str='http:\/\/127.0.0.1:8050'/str='http:\/\/splash:8050'/g" lookyloo/lookyloo.py
|
|
||||||
RUN pipenv install
|
|
||||||
run echo LOOKYLOO_HOME="'`pwd`'" > .env
|
|
||||||
|
|
||||||
run nohup pipenv run run_backend.py --start
|
COPY lookyloo lookyloo/
|
||||||
run nohup pipenv run async_scrape.py
|
COPY client client/
|
||||||
CMD ["pipenv", "run", "start_website.py"]
|
COPY bin bin/
|
||||||
EXPOSE 5100
|
COPY website website/
|
||||||
|
COPY setup.py .
|
||||||
|
COPY Pipfile .
|
||||||
|
COPY Pipfile.lock .
|
||||||
|
|
||||||
|
RUN mkdir cache user_agents scraped
|
||||||
|
|
||||||
|
RUN pipenv install
|
||||||
|
RUN echo LOOKYLOO_HOME="'`pwd`'" > .env
|
||||||
|
|
|
@ -17,6 +17,7 @@ if __name__ == '__main__':
|
||||||
p = Popen(['gunicorn', '--worker-class', 'eventlet', '-w', '10',
|
p = Popen(['gunicorn', '--worker-class', 'eventlet', '-w', '10',
|
||||||
'--graceful-timeout', '2', '--timeout', '30',
|
'--graceful-timeout', '2', '--timeout', '30',
|
||||||
'-b', '0.0.0.0:5100',
|
'-b', '0.0.0.0:5100',
|
||||||
|
'--log-level', 'info',
|
||||||
'web:app'],
|
'web:app'],
|
||||||
cwd=website_dir)
|
cwd=website_dir)
|
||||||
set_running('website')
|
set_running('website')
|
||||||
|
|
|
@ -1,24 +1,38 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
|
working_dir: /cache
|
||||||
|
command: ./cache.conf --daemonize no
|
||||||
|
volumes:
|
||||||
|
- ./cache:/cache
|
||||||
|
|
||||||
splash:
|
splash:
|
||||||
image: "scrapinghub/splash"
|
image: "scrapinghub/splash"
|
||||||
expose:
|
ports:
|
||||||
- "8050"
|
- "8050:8050"
|
||||||
- "5023"
|
- "5023:5023"
|
||||||
command: --disable-ui --disable-lua
|
command: --disable-lua --disable-private-mode
|
||||||
|
|
||||||
lookyloo:
|
lookyloo:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
working_dir: /lookyloo
|
||||||
- "5100:5100"
|
tty: true
|
||||||
tty: true
|
environment:
|
||||||
command:
|
- SPLASH_URL=http://splash:8050
|
||||||
- /bin/sh
|
command:
|
||||||
- -c
|
- /bin/sh
|
||||||
- |
|
- -c
|
||||||
pipenv run run_backend.py --start
|
- |
|
||||||
pipenv run async_scrape.py &
|
pipenv run async_scrape.py &
|
||||||
pipenv run start_website.py
|
pipenv run start_website.py
|
||||||
#volumes:
|
volumes:
|
||||||
# - /path/to/your/data/directory:/lookyloo/scraped
|
- ./cache:/lookyloo/cache
|
||||||
|
- ./scraped:/lookyloo/scraped
|
||||||
|
- ./user_agents:/lookyloo/user_agents
|
||||||
|
ports:
|
||||||
|
- "5100:5100"
|
||||||
|
links:
|
||||||
|
- "redis"
|
||||||
|
- "splash"
|
||||||
|
|
|
@ -33,7 +33,10 @@ app.config['SESSION_COOKIE_NAME'] = 'lookyloo'
|
||||||
app.debug = False
|
app.debug = False
|
||||||
|
|
||||||
# API entry point for splash
|
# API entry point for splash
|
||||||
splash_url = 'http://127.0.0.1:8050'
|
if os.environ.get('SPLASH_URL'):
|
||||||
|
splash_url = os.environ.get('SPLASH_URL')
|
||||||
|
else:
|
||||||
|
splash_url = 'http://127.0.0.1:8050'
|
||||||
# Splash log level
|
# Splash log level
|
||||||
loglevel = logging.DEBUG
|
loglevel = logging.DEBUG
|
||||||
# Set it to True if your instance is publicly available so users aren't able to scan your internal network
|
# Set it to True if your instance is publicly available so users aren't able to scan your internal network
|
||||||
|
|
Loading…
Reference in New Issue