-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
38 lines (26 loc) · 853 Bytes
/
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
FROM alpine:3.14
RUN apk add --no-cache dos2unix python3 py3-pip nginx bash
# build + install python mysqlclient
RUN apk add --no-cache mariadb-connector-c-dev \
&& apk add --no-cache --virtual .build-deps \
python3-dev build-base mariadb-dev \
&& pip install mysqlclient \
&& apk del .build-deps
WORKDIR /pasta
RUN mkdir api
RUN mkdir /logs
COPY ./api/api.py ./api/
COPY ./api/clean_db.py ./api/
COPY ./api/server_db.py ./api/
COPY ./api/wsgi.py ./api/
COPY ./api/requirements.txt ./api/
COPY ./api/words.txt ./api/
COPY ./api/auth.json.secret.noauth ./api/auth.json.secret
COPY ./website ./website
COPY ./docker-nginx.conf /etc/nginx/nginx.conf
COPY ./docker-entrypoint.sh .
RUN dos2unix docker-entrypoint.sh
WORKDIR /pasta/api
RUN pip3 install -r requirements.txt
EXPOSE 80
ENTRYPOINT ["/pasta/docker-entrypoint.sh"]