forked from oscarso2000/MyCourseIndex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
executable file
·39 lines (26 loc) · 1.14 KB
/
dockerfile
File metadata and controls
executable file
·39 lines (26 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM node:12.16-alpine3.11 as builder
WORKDIR /app
COPY client/package.json client/yarn.lock /app/
COPY client /app/
RUN yarn install && yarn build
###############################################################################
FROM python:3.7.7-slim-buster
ENV PIP_DEFAULT_TIMEOUT=100 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
POETRY_VERSION=1.1.4
RUN pip install -U pip && pip install "poetry==$POETRY_VERSION"
WORKDIR /app
COPY poetry.lock pyproject.toml /app/
copy piazza-api/dist/piazza_api-0.1.0-py3-none-any.whl /app/piazza-api/dist/
RUN apt-get update -y && apt-get install -y gcc g++
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-dev --no-root && python -m spacy download en_core_web_lg && python -m spacy download en
COPY --from=builder /app/build /app/client/build
COPY app.py /app
COPY app /app/app
COPY concept_matching /app/concept_matching/
RUN python concept_matching/install_quickdb.py
# DEV ONLY
# COPY secrets /app/secrets
EXPOSE 5000
CMD ["python", "-m", "gunicorn.app.wsgiapp", "app:app", "-w 2", "-b 0.0.0.0:5000", "--log-level", "DEBUG", "--timeout", "3600"]