Skip to content

Commit

Permalink
chore: remove escape_json.c
Browse files Browse the repository at this point in the history
  • Loading branch information
danipran committed Jun 4, 2024
1 parent f7228b2 commit b878be6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ ENV PYTHONUNBUFFERED True

COPY --chown=kerrokantasi:kerrokantasi requirements.txt .
COPY --chown=kerrokantasi:kerrokantasi requirements-prod.txt .
COPY --chown=kerrokantasi:kerrokantasi deploy/escape_json.c ./deploy/escape_json.c

# less & netcat-openbsd are there for in-container manual debugging
# kerrokantasi needs gdal
RUN apt-get update \
&& apt-get install -y \
build-essential \
postgresql-client \
less \
netcat-openbsd \
Expand All @@ -40,9 +38,6 @@ RUN apt-get update \
&& pip install --upgrade pip setuptools wheel \
&& pip install --no-cache-dir -r ./requirements.txt \
&& pip install --no-cache-dir -r ./requirements-prod.txt \
&& uwsgi --build-plugin ./deploy/escape_json.c \
&& mv ./escape_json_plugin.so ./deploy/escape_json_plugin.so \
&& apt-get remove -y build-essential

# Sentry CLI for sending events from non-Python processes to Sentry
# eg. https://docs.sentry.io/cli/send-event/#bash-hook
Expand Down
42 changes: 0 additions & 42 deletions deploy/escape_json.c

This file was deleted.

3 changes: 1 addition & 2 deletions deploy/uwsgi.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
uwsgi:
plugin: deploy/escape_json_plugin.so
# Needed plugins if running against Debian uwsgi-package
# python docker image cannot use that due to linker mishaps
# plugins: python3,http
Expand All @@ -23,6 +22,6 @@ uwsgi:
disable-write-exception: true

logger-req: stdio
log-format: '"remote_addr": "%(addr)", "x_forwarded_for":"%(var.HTTP_X_FORWARDED_FOR)", "request_id":"%(var.HTTP_X_REQUEST_ID)", "remote_user":"%(user)", "bytes_sent":%(size), "request_time":%(secs), "status":%(status), "host":"%(json_host)", "request_proto":"%(proto)", "path":"%(json_uri)", "request_length":%(cl), "http_referer":"%(referer)", "http_user_agent":"%(uagent)"'
log-format: '"remote_addr": "%(addr)", "x_forwarded_for":"%(var.HTTP_X_FORWARDED_FOR)", "request_id":"%(var.HTTP_X_REQUEST_ID)", "remote_user":"%(user)", "bytes_sent":%(size), "request_time":%(secs), "status":%(status), "host":"%(host)", "request_proto":"%(proto)", "path":"%(uri)", "request_length":%(cl), "http_referer":"%(referer)", "http_user_agent":"%(uagent)"'
log-req-encoder: format {"time":"${strftime:%%Y:%%m:%%d %%H:%%M:%%S}", "source":"uwsgi-req", ${msg}}
log-req-encoder: nl

0 comments on commit b878be6

Please sign in to comment.