compose
This commit is contained in:
parent
ac7dd7185f
commit
3e3df9f015
2 changed files with 11 additions and 48 deletions
43
README.md
43
README.md
|
@ -1,43 +0,0 @@
|
|||
# python-api-server
|
||||
|
||||
a small flask-application for storing and downloading stuff like small binaries
|
||||
|
||||
## Variables
|
||||
|
||||
- ``MAX_CONTENT_LENGTH``: maximal Filesize in MB; defaults to 5MB
|
||||
- ``UPLOAD_DIRECTORY``: where to store the uploaded files; should be mapped to a volume; defaults to "/uploads"
|
||||
- ``AUTH_TOKEN``: token used for authenticating
|
||||
|
||||
## Example Docker-Compose
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
services:
|
||||
python-api-server:
|
||||
container_name: httpd-api
|
||||
image: quotengrote/python-api-server:v2
|
||||
ports:
|
||||
- "5040:5000"
|
||||
volumes:
|
||||
- uploads:/uploads
|
||||
environment:
|
||||
# FLASK_DEBUG: 1 # for debugging
|
||||
# FLASK_APP: app # for debugging
|
||||
MAX_CONTENT_LENGTH: 10
|
||||
UPLOAD_DIRECTORY: /uploads
|
||||
AUTH_TOKEN: myuploadtoken
|
||||
ENABLE_WEBSERVER: true # if enabled a list of files can be viewed in a webbrowser (see screenshot)
|
||||
|
||||
volumes:
|
||||
uploads:
|
||||
|
||||
```
|
||||
|
||||
### ENABLE_WEBSERVER Screenshot
|
||||
|
||||
|
||||
![](./assets/screenshot_webui.png)
|
||||
|
||||
## API-Endpoints
|
||||
|
||||
- see [Flasgger](https://github.com/flasgger/flasgger): ``http://<host>:5040/apidocs/``
|
|
@ -4,10 +4,16 @@ services:
|
|||
routeros-config-export:
|
||||
image: registry.mgrote.net/oxidized-selfmade:latest
|
||||
environment:
|
||||
- DEVICE_CONFIGS=device1,username1,/path/to/ssh/key1 device2,username2,/path/to/ssh/key2
|
||||
- GIT_REPO_URL=your_git_repo_ssh_url
|
||||
- GIT_USERNAME=your_git_username
|
||||
- GIT_SSH_KEY=/app/your_git_ssh_key_file
|
||||
- DEVICE_CONFIGS=rb5009.grote.lan,test,/keys/rb5009
|
||||
- GIT_REPO_URL=ssh://gitea@git.mgrote.net:2222/mg/network-configs.git
|
||||
- GIT_USERNAME=gitea # nur für comitter name
|
||||
- GIT_SSH_KEY=/keys/git
|
||||
volumes:
|
||||
- /path/to/your_git_ssh_key_file:/app/your_git_ssh_key_file:ro
|
||||
# key rb5009
|
||||
- ./keys/rb5009:/keys/rb5009:ro
|
||||
# git
|
||||
- ./keys/git:/keys/git:ro
|
||||
# Add any other volumes or configurations needed
|
||||
|
||||
|
||||
# der zweite key für admin auf dem router ist der hier, in irantu/wsl hinterlegt
|
||||
|
|
Loading…
Reference in a new issue