adding LANG LC_ALL PYTHONIOENCODING UTF-8 (#22928)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
# Alternatively you can set it with `SECRET_KEY` environment variable.
|
||||
SECRET_KEY=
|
||||
|
||||
# Ensure UTF-8 encoding
|
||||
LANG=en_US.UTF-8
|
||||
LC_ALL=en_US.UTF-8
|
||||
PYTHONIOENCODING=utf-8
|
||||
|
||||
# Console API base URL
|
||||
CONSOLE_API_URL=http://localhost:5001
|
||||
CONSOLE_WEB_URL=http://localhost:3000
|
||||
|
@@ -37,6 +37,11 @@ EXPOSE 5001
|
||||
# set timezone
|
||||
ENV TZ=UTC
|
||||
|
||||
# Set UTF-8 locale
|
||||
ENV LANG=en_US.UTF-8
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
ENV PYTHONIOENCODING=utf-8
|
||||
|
||||
WORKDIR /app/api
|
||||
|
||||
RUN \
|
||||
|
@@ -2,6 +2,11 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Set UTF-8 encoding to address potential encoding issues in containerized environments
|
||||
export LANG=${LANG:-en_US.UTF-8}
|
||||
export LC_ALL=${LC_ALL:-en_US.UTF-8}
|
||||
export PYTHONIOENCODING=${PYTHONIOENCODING:-utf-8}
|
||||
|
||||
if [[ "${MIGRATION_ENABLED}" == "true" ]]; then
|
||||
echo "Running migrations"
|
||||
flask upgrade-db
|
||||
|
Reference in New Issue
Block a user