-
Notifications
You must be signed in to change notification settings - Fork 34
/
Dockerfile
66 lines (42 loc) · 1.4 KB
/
Dockerfile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM ubuntu:20.04
RUN apt-get update -y
RUN apt-get install -y \
build-essential \
python3.7 \
python3-pip
RUN mkdir -p usr/src/app/middleware
WORKDIR /usr/src/app/middleware/
COPY ./middleware/ /usr/src/app/middleware/
RUN pip install -r requirements.txt
RUN python3 -m nltk.downloader stopwords
RUN python3 -m nltk.downloader punkt
RUN python3 -m nltk.downloader averaged_perceptron_tagger
RUN python3 -m nltk.downloader universal_tagset
RUN python3 -m nltk.downloader wordnet
RUN python3 -m nltk.downloader brown
RUN python3 -m nltk.downloader maxent_ne_chunker
RUN pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.1/en_core_web_sm-2.3.1.tar.gz
RUN nohup python3 app.py > log.txt 2>&1 &
WORKDIR /usr/src/app
COPY ./webapp/package.json ./
COPY ./webapp/api/package.json ./api/
COPY ./webapp/api/yarn.lock ./api/
COPY ./webapp/client/package.json ./client/
COPY ./webapp/client/yarn.lock ./client/
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y software-properties-common
RUN apt-get install -y npm
RUN npm install npm@latest -g
RUN apt remove cmdtest
RUN apt remove yarn
RUN npm install -g yarn
RUN npm i -g node
RUN cd api && yarn install
RUN cd client && yarn install
COPY ./webapp/client /usr/src/app/client
COPY ./webapp/api /usr/src/app/api
WORKDIR /usr/src/app/api/
RUN yarn build
EXPOSE 5000
# EXPOSE 3000
CMD ["npm", "start"]