Skip to content

Commit

Permalink
Preparing for the deployer.
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoFHG committed May 2, 2020
1 parent 2188445 commit 6078718
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
25 changes: 8 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
FROM python:3.8.2-alpine3.11

FROM python:alpine3.11 as build-stage
WORKDIR /home/app/
RUN apk add --no-cache git \
&& pip install --upgrade pip \
&& adduser -D worker \
&& pip install pipenv

USER worker

WORKDIR /home/worker

ENV PATH="/home/worker/.local/bin:${PATH}"

COPY --chown=worker:worker Pipfile Pipfile
RUN pipenv lock -r > requirements.txt
RUN pip install --user -r requirements.txt

COPY --chown=worker:worker . .
&& git clone https://github.com/KebabWarriors/FileIndexerAPI.git \
&& cd FileIndexerAPI \
&& pip install --install-option="--prefix=/install" -r requirements.txt

FROM python:alpine3.11 as deploy-stage
WORKDIR /home/app/
COPY --from=build-stage /home/app/FileIndexerAPI/file_indexer_api/ /home/app/
9 changes: 0 additions & 9 deletions docker-compose.yml

This file was deleted.

2 changes: 1 addition & 1 deletion file_indexer_api/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from file_indexer_api.app import app

if __name__ == '__main__':
app.run(debug=True)
app.run()

13 changes: 13 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-i https://pypi.org/simple
aniso8601==8.0.0
click==7.1.1
flask-restful==0.3.8
flask==1.1.2
itsdangerous==1.1.0
jinja2==2.11.2
markupsafe==1.1.1
plumbum==1.6.9
pytz==2019.3
rpyc==4.1.5
six==1.14.0
werkzeug==1.0.1

0 comments on commit 6078718

Please sign in to comment.