-
Notifications
You must be signed in to change notification settings - Fork 24
/
Dockerfile.frontend
45 lines (30 loc) · 1.09 KB
/
Dockerfile.frontend
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
# Building and Copying frontend resources
FROM node:12-slim as builder
ADD frontend /usr/local/amundsen/frontend/
WORKDIR /usr/local/amundsen/frontend/
RUN chmod 755 static_build.sh
RUN ./static_build.sh
FROM python:3.7-slim
ENV LANG="en_US.utf8" \
AMUNDSEN_SERVICE_NAME="frontend"
# use sock
ENV GUNICORN_BIND="0.0.0.0:5000" \
GUNICORN_TIMEOUT=60 \
GUNICORN_WORKERS=2
ENV GUNICORN_CMD_ARGS="--bind=${GUNICORN_BIND} --timeout=${GUNICORN_TIMEOUT} --workers=${GUNICORN_WORKERS} --access-logfile - -"
ADD frontend /usr/local/amundsen/frontend
WORKDIR /usr/local/amundsen/frontend/
ENV PYTHONPATH=$PYTHONPATH:/usr/local/amundsen/frontend
# Install the local copy of upstream
RUN pip install upstream/
# Install the custom requirements
RUN pip install -r requirements.txt
# Serve the static contents from the custom builder
COPY --from=builder /usr/local/amundsen/frontend/configs/ configs/
ENV FLASK_DEBUG 0
ENV FLASK_ENV production
RUN useradd -u 1000 amundsen
RUN chown -hR 1000:1000 /usr/local/amundsen
EXPOSE 5000
ENTRYPOINT ["gunicorn"]
CMD ["wsgi:app"," --timeout 1800", "--preload"]