Skip to content

Commit

Permalink
Added Docker Compose functionality to achieve a fully functional Reco…
Browse files Browse the repository at this point in the history
…n-API.
  • Loading branch information
lanmaster53 committed Oct 28, 2019
1 parent ec96b94 commit 9e99f71
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.pyc
*.rdb
*sublime*
venv/
scripts/
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ RUN apk add --no-cache --virtual .build-deps gcc libc-dev libxslt-dev && \
apk add --no-cache libxslt && \
pip install --no-cache-dir lxml && \
apk del .build-deps && \
apk add git && \
git clone --single-branch --branch staging https://github.com/lanmaster53/recon-ng.git /root/recon-ng
mkdir -p /recon-ng

WORKDIR /root/recon-ng
WORKDIR /recon-ng

RUN pip install -r REQUIREMENTS
ADD ./REQUIREMENTS /recon-ng/REQUIREMENTS

CMD ./recon-ng
RUN pip install -r REQUIREMENTS
32 changes: 32 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '3.7'

services:

web:
build: .
image: recon-ng
container_name: recon-ng
ports:
- '5000:5000'
command: ./recon-web --host 0.0.0.0
volumes:
- .:/recon-ng
- ~/.recon-ng:/root/.recon-ng
environment:
- REDIS_URL=redis://redis:6379/0
depends_on:
- redis

worker:
image: recon-ng
command: rq worker -u redis://redis:6379/0 recon-tasks
volumes:
- .:/recon-ng
- ~/.recon-ng:/root/.recon-ng
environment:
- REDIS_URL=redis://redis:6379/0
depends_on:
- redis

redis:
image: redis
3 changes: 2 additions & 1 deletion recon/core/web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from recon.core.constants import BANNER_WEB
from recon.core.web.db import Tasks
from redis import Redis
import os
import rq

# disable the development server warning banner
Expand All @@ -20,7 +21,7 @@
DEBUG = False
SECRET_KEY = 'we keep no secrets here.'
JSON_SORT_KEYS = False
REDIS_URL = 'redis://'
REDIS_URL = os.environ.get('REDIS_URL', 'redis://')
SWAGGER = {
'title': 'Swagger',
'info': {
Expand Down

0 comments on commit 9e99f71

Please sign in to comment.