Skip to content

Commit

Permalink
Añadido Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfeitopin authored Feb 24, 2023
1 parent 3002a2d commit d2c6655
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__pycache__
#src/.env
src/data
__pycache__
src/.env
src/data
src/instance
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3
WORKDIR /usr/
RUN git clone https://github.com/danielfeitopin/TFG.git

WORKDIR /usr/TFG/src/
RUN pip install --no-cache-dir pipenv \
&& python3 -m pipenv requirements > requirements.txt \
&& pip install --no-cache-dir -r requirements.txt

COPY ./data/ /usr/TFG/data/
RUN touch .env \
&& echo "#Ruta del fichero YAML" >> .env \
&& echo 'PHISHING_QUIZ_EMAILS="/usr/TFG/data/phishing_quiz/emails.yml"' >> .env \
&& echo "#Ruta del directorio con los ficheros YAML" >> .env \
&& echo 'MODULES_DATA_FOLDER="/usr/TFG/data/modules"' >> .env \
&& python3 -m flask db init \
&& python3 -m flask courses db load \
&& python3 -m flask phishing_quiz db load

CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"]

0 comments on commit d2c6655

Please sign in to comment.