diff --git a/emmet-api/Dockerfile b/emmet-api/Dockerfile index 381d3cf7e9..4ac1c3ec27 100644 --- a/emmet-api/Dockerfile +++ b/emmet-api/Dockerfile @@ -20,7 +20,7 @@ RUN wget -q https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait- FROM base COPY --from=builder /root/.local/lib/python3.10/site-packages /root/.local/lib/python3.10/site-packages COPY --from=builder /root/.local/bin /root/.local/bin -COPY --from=builder /usr/lib/x86_64-linux-gnu/libsnappy* /usr/lib/x86_64-linux-gnu/ +COPY --from=builder /usr/lib/aarch64-linux-gnu/cmake/Snappy/* /usr/lib/aarch64-linux-gnu/ COPY --from=builder /emmet-api /emmet-api WORKDIR /emmet-api ARG VERSION @@ -48,4 +48,5 @@ RUN chmod +x start.sh LABEL com.datadoghq.ad.logs='[{"source": "gunicorn", "service": "next-gen-api"}]' EXPOSE 10001 20001 +#CMD wait-for-it.sh $DD_TRACE_HOST -q -s -t 60 -- ./start.sh CMD ./start.sh diff --git a/emmet-api/start.sh b/emmet-api/start.sh index 5765190a30..fd63677511 100644 --- a/emmet-api/start.sh +++ b/emmet-api/start.sh @@ -25,3 +25,10 @@ if [[ -n "$STATS_ARG" ]]; then else exec gunicorn $MAIN_ARGS "${ACCESS_LOG_FORMAT[@]}" $SERVER_APP fi +#exec ddtrace-run gunicorn --statsd-host $DD_AGENT_HOST:8125 \ +exec gunicorn \ + -b 0.0.0.0:$PORT -k uvicorn.workers.UvicornWorker -w $NUM_WORKERS \ + --access-logfile - --error-logfile - $RELOAD \ + --max-requests $MAX_REQUESTS --max-requests-jitter $MAX_REQUESTS_JITTER \ + --timeout 120 \ + app:app