Skip to content

Commit

Permalink
Switch to poetry, add docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlim committed Nov 26, 2019
1 parent a451a08 commit d373c3c
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 246 deletions.
19 changes: 9 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ RUN apt-get install -y --fix-missing \
pkg-config \
python3-dev \
python3-numpy \
python-dev \
libpq-dev \
software-properties-common \
zip \
&& apt-get clean && rm -rf /tmp/* /var/tmp/*
Expand All @@ -30,16 +32,13 @@ RUN cd ~ && \
cd dlib/ && \
python3 setup.py install --yes USE_AVX_INSTRUCTIONS

RUN pip install pipenv
RUN pip install poetry

WORKDIR /identifier
COPY Pipfile* start.sh ./
RUN pipenv lock --requirements > requirements.txt
RUN pip install -r requirements.txt
COPY src ./src
WORKDIR ./
COPY ./ ./

#RUN pipenv install
RUN poetry install

EXPOSE 5001
# ENTRYPOINT ["pipenv run sh /identifier/start.sh"]
CMD ["pipenv", "run", "sh", "./start.sh"]
EXPOSE 5000

CMD ["poetry", "run", "python", "src/app.py"]
17 changes: 0 additions & 17 deletions Pipfile

This file was deleted.

213 changes: 0 additions & 213 deletions Pipfile.lock

This file was deleted.

12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'
services:
web:
build: .
ports:
- "5000:5000"
links:
- "db:database"
db:
image: "postgres"
ports:
- "5432:5432"
Loading

0 comments on commit d373c3c

Please sign in to comment.