Commit fd42bf0c authored by Klaus Franken's avatar Klaus Franken
Browse files

Dockerfiles and Docu

parent 4ff7e281
Pipeline #241 passed with stage
in 38 seconds
.DS_Store
__pycache__
config.py
data/data/
#start cmd could look like this: docker run -p [hostport]:8000 -v [hostdatapath]:/data/ vocabtrainer
FROM python-modules
#python-modules needs to exist, image from python with the necessary modules
# FROM python:3
# RUN pip install flask
# RUN pip install waitress
# RUN pip install requests
ADD . /vocab
ADD Docker/config.py /vocab/app/
CMD ["python","./vocab/app/main.py"]
Build and run docker from main directory. Check ../README.md
\ No newline at end of file
Productive Server: https://webvokabeln.de
\ No newline at end of file
# Productive Server
https://webvokabeln.de
# Usage
* Standard-User: admin/admin
## Docker
### Build:
* Build `python_modules` image: `docker build --pull --rm -f "Docker/Dockerfile-python-modules" -t python-modules:latest "."`
* this is only necessary once, if done you can work offline
* Build `webvokabeln` image: `docker build --rm -f "Docker/Dockerfile" -t webvokabeln:latest "."`
### Run:
* local data: `docker run -p 8080:8000 webvokabeln:latest`
* where: '8080' is the external port
* external data: `docker run -p 8080:8000 -v $(pwd)/data:/data/ webvokabeln:latest`
* where `$(pwd)/data` is the host folder, hint: use absolute path
## VM
* copy/create a config as `app/config.py`
* use Docker/config.py as example
* Install python3 and modules
* see Docker/Dockerfile-python-modules for needed python modules
* Ubuntu 18.4: `apt install python3-flask python3-waitress python-pkg-resources`
* start: `/usr/bin/python3 app/main.py`
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment