Docker configuration
This commit is contained in:
parent
de195834df
commit
bdf6dd4e77
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM python:3.9.2-slim as build
|
||||||
|
COPY . /app
|
||||||
|
WORKDIR /app
|
||||||
|
RUN python setup.py install
|
||||||
|
|
||||||
|
FROM python:3.9.2-alpine3.13
|
||||||
|
COPY --from=build /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages
|
||||||
|
|
||||||
|
RUN pip3 install gunicorn
|
||||||
|
|
||||||
|
ENTRYPOINT ["gunicorn"]
|
||||||
|
CMD ["overseer:app", "--bind", "0.0.0.0:5000", "--threads=4"]
|
@ -1,4 +1,4 @@
|
|||||||
include src/overseer/static/*
|
recursive-include src/overseer/api *.py
|
||||||
include src/overseer/templates/*
|
recursive-include src/overseer/static *
|
||||||
include src/overseer/api/*
|
recursive-include src/overseer/resources *
|
||||||
include src/overseer/api/v1/*
|
recursive-include src/overseer/templates *
|
||||||
|
16
README.md
16
README.md
@ -3,6 +3,15 @@
|
|||||||
## Description
|
## Description
|
||||||
Overseer is a port scanning web interface. All current and historical results are stored in a database.
|
Overseer is a port scanning web interface. All current and historical results are stored in a database.
|
||||||
|
|
||||||
|
## Running
|
||||||
|
```
|
||||||
|
# Be sure image is built
|
||||||
|
docker-compose build
|
||||||
|
|
||||||
|
# Run compose in background. Service accessible via localhost:5000
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
## Developing
|
## Developing
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
@ -30,13 +39,6 @@ You must run these commands from the `./src/overseer_client/` directory:
|
|||||||
yarn build
|
yarn build
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running
|
|
||||||
|
|
||||||
Ideally from a virtual env:
|
|
||||||
```
|
|
||||||
overseer run
|
|
||||||
```
|
|
||||||
|
|
||||||
# Notes
|
# Notes
|
||||||
In a production environment, it would be ideal to setup something like nginx to properly forward
|
In a production environment, it would be ideal to setup something like nginx to properly forward
|
||||||
the `/api/*` routes to the Flask server, and all other endpoints to the static client resources.
|
the `/api/*` routes to the Flask server, and all other endpoints to the static client resources.
|
||||||
|
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
services:
|
||||||
|
overseer:
|
||||||
|
ports:
|
||||||
|
- '5000:5000'
|
||||||
|
build: .
|
||||||
|
volumes:
|
||||||
|
- .:/app
|
2
setup.py
2
setup.py
@ -11,9 +11,9 @@ setup(
|
|||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
entry_points={"console_scripts": ["overseer = overseer:cli"]},
|
entry_points={"console_scripts": ["overseer = overseer:cli"]},
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"Flask",
|
|
||||||
"flask_socketio",
|
"flask_socketio",
|
||||||
"sqlalchemy",
|
"sqlalchemy",
|
||||||
|
"Flask",
|
||||||
],
|
],
|
||||||
extras_require={"dev": ["pre-commit", "black", "flake8", "pytest"]},
|
extras_require={"dev": ["pre-commit", "black", "flake8", "pytest"]},
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user