Skip to content
Snippets Groups Projects
Verified Commit 5ea901e6 authored by Torma Kristóf's avatar Torma Kristóf :alien:
Browse files

init

parent 96ed31ad
No related branches found
No related tags found
No related merge requests found
language: python
dist: bionic
cache: pip
services:
- docker
install:
- pip3 install pylint bandit mccabe
- pip3 install -r requirements.txt
before_script:
- find . -name "*.py" -exec python3 -m py_compile '{}' \;
- find . -name "*.py" -exec pylint '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
- find . -name "*.py" -exec python3 -m mccabe --min 3 '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
- bandit -r .
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t="$TRAVIS_REPO_SLUG:$TRAVIS_BUILD_NUMBER" . && docker push "$TRAVIS_REPO_SLUG:$TRAVIS_BUILD_NUMBER"
FROM python:3
WORKDIR /app
COPY requirements.txt
RUN pip3 install -r requirements.txt
COPY . .
EXPOSE 8080
VOLUME /data
CMD ["python3","app.py"]
# docker-eloadas
KSZK 2019 Docker Előadás
[![Build Status](https://travis-ci.com/tormachris/docker-eloadas.svg?branch=master)](https://travis-ci.com/tormachris/docker-eloadas)
app.py 0 → 100644
from flask import Flask
app = Flask(__name__)
@app.route("/")
def readfile():
with open("/data/file.txt",'r') as inputfile:
return inputFile.readline()
if __name__ == "__main__":
app.run(host='0.0.0.0', port=8080)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment