forked from erickythierry/transcreveAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (25 loc) · 787 Bytes
/
Dockerfile
File metadata and controls
39 lines (25 loc) · 787 Bytes
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 python:3.11-alpine AS builder
WORKDIR /transcreve-api
RUN apk add --no-cache git ffmpeg build-base
COPY . .
RUN pip install --no-cache-dir -r requirements.txt --target=/transcreve-api/venv
FROM python:3.11-alpine
WORKDIR /transcreve-api
RUN apk add --no-cache \
bash \
dumb-init \
tzdata \
ffmpeg \
flac \
wget \
ca-certificates
ENV TZ=America/Sao_Paulo
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY --from=builder /transcreve-api /transcreve-api
ENV PYTHONPATH=/transcreve-api/venv
ENV PATH=/transcreve-api/venv/bin:$PATH
EXPOSE 5000
ENTRYPOINT ["dumb-init", "--"]
ENV WORKERS=4
ENV LOGLEVEL="info"
CMD ["sh", "-c", "gunicorn --bind 0.0.0.0:5000 main:app --workers ${WORKERS} --log-level ${LOGLEVEL}"]