parent
4c054ba98e
commit
7d9ceac239
@ -0,0 +1,37 @@ |
||||
# To build the image: |
||||
# docker build --tag vasl-templates . |
||||
# Add "--build-arg ENABLE_TESTS=1" to allow the test suite to be run against a container. |
||||
# |
||||
# To run a container: |
||||
# docker run --rm -it --name vasl-templates \ |
||||
# -p 5010:5010 \ |
||||
# -v .../vasl-6.4.3.vmod:/data/vasl.vmod \ |
||||
# vasl-templates |
||||
|
||||
FROM python:alpine3.6 |
||||
|
||||
# NOTE: pillow needs zlib and jpeg, lxml needs libxslt, we need build-base for gcc, etc. |
||||
RUN apk add --no-cache build-base zlib-dev jpeg-dev libxslt-dev |
||||
ENV LIBRARY_PATH=/lib:/usr/lib |
||||
|
||||
WORKDIR /app |
||||
|
||||
ARG ENABLE_TESTS |
||||
|
||||
# install the Python requirements |
||||
COPY requirements.txt requirements-dev.txt ./ |
||||
RUN pip install -r requirements.txt ; \ |
||||
if [ "$ENABLE_TESTS" ]; then pip install -r requirements-dev.txt ; fi |
||||
|
||||
# install the application |
||||
ADD vasl_templates vasl_templates |
||||
COPY setup.py LICENSE.txt ./ |
||||
RUN pip install -e . |
||||
|
||||
# copy the config files |
||||
COPY docker/config/* vasl_templates/webapp/config/ |
||||
RUN if [ "$ENABLE_TESTS" ]; then echo "ENABLE_REMOTE_TEST_CONTROL = 1" >>vasl_templates/webapp/config/debug.cfg ; fi |
||||
|
||||
EXPOSE 5010 |
||||
COPY docker/run.sh . |
||||
CMD ./run.sh |
@ -0,0 +1,3 @@ |
||||
[Debug] |
||||
|
||||
TEST_VASL_MODS = /test-data/vasl-vmods |
@ -0,0 +1,31 @@ |
||||
version: 1 |
||||
|
||||
formatters: |
||||
standard: |
||||
format: "%(asctime)s.%(msecs)03d | %(message)s" |
||||
datefmt: "%H:%M:%S" |
||||
|
||||
handlers: |
||||
console: |
||||
class: "logging.StreamHandler" |
||||
formatter: "standard" |
||||
stream: "ext://sys.stdout" |
||||
file: |
||||
class: "logging.FileHandler" |
||||
formatter: "standard" |
||||
filename: "/tmp/vasl-templates.log" |
||||
mode: "w" |
||||
|
||||
loggers: |
||||
werkzeug: |
||||
level: "WARNING" |
||||
handlers: [ "console" ] |
||||
vasl_mod: |
||||
level: "WARNING" |
||||
handlers: [ "console", "file" ] |
||||
update_vsav: |
||||
level: "WARNING" |
||||
handlers: [ "console", "file" ] |
||||
control_tests: |
||||
level: "DEBUG" |
||||
handlers: [ "console", "file" ] |
@ -0,0 +1,5 @@ |
||||
[Site Config] |
||||
|
||||
FLASK_HOST = 0.0.0.0 |
||||
|
||||
VASL_MOD = /data/vasl.vmod |
@ -0,0 +1,3 @@ |
||||
#!/bin/sh |
||||
|
||||
python /app/vasl_templates/webapp/run_server.py |
@ -0,0 +1,6 @@ |
||||
pytest==3.6.0 |
||||
tabulate==0.8.2 |
||||
lxml==4.2.4 |
||||
pylint==1.9.2 |
||||
pytest-pylint==0.9.0 |
||||
pyinstaller==3.4 |
@ -0,0 +1,5 @@ |
||||
flask==1.0.2 |
||||
pyyaml==3.13 |
||||
pillow==5.3.0 |
||||
selenium==3.12.0 |
||||
click==6.7 |
Loading…
Reference in new issue