Skip to content

Commit

Permalink
changes for docker on arm64 architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
yang-ruoxi committed Aug 12, 2024
1 parent f925e5f commit b1c674f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion emmet-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
7 changes: 7 additions & 0 deletions emmet-api/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b1c674f

Please sign in to comment.