Skip to content

Commit

Permalink
build(docker): bump python version in Dockerfile (#366)
Browse files Browse the repository at this point in the history
* build(docker): bump python version in Dockerfile

* refactor(settings): reformat for black
  • Loading branch information
CapooL authored May 20, 2024
1 parent c0870e3 commit 88735f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 2 additions & 7 deletions hinghwa-dict-backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
FROM python:3.10
FROM python:3.10-bookworm

WORKDIR /usr/src/HinghwaDict-backend

#更新apt-get源 使用163的源
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
echo "deb https://mirrors.163.com/debian/ bullseye main non-free contrib" >/etc/apt/sources.list && \
echo "deb https://mirrors.163.com/debian-security/ bullseye-security main" >>/etc/apt/sources.list && \
echo "deb https://mirrors.163.com/debian/ bullseye-updates main non-free contrib" >>/etc/apt/sources.list && \
echo "deb https://mirrors.163.com/debian/ bullseye-backports main non-free contrib" >>/etc/apt/sources.list
RUN sed -i '[email protected]@repo.huaweicloud.com@g' /etc/apt/sources.list.d/debian.sources
RUN apt-get update
RUN apt-get install ffmpeg -y

Expand Down
10 changes: 9 additions & 1 deletion hinghwa-dict-backend/HinghwaDict/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@
APPEND_SLASH = False

CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_ALLOW_ALL = True
CORS_ORIGIN_WHITELIST = (
"http://127.0.0.1:*",
"https://api.pxm.edialect.top:*",
Expand Down Expand Up @@ -188,6 +187,15 @@
"x-token",
"token",
)

CSRF_TRUSTED_ORIGINS = [
"http://127.0.0.1:*",
"https://api.pxm.edialect.top",
"https://api.pxm.test.edialect.top",
"https://pxm.edialect.top:*",
"https://localhost:*",
]

# parameter of Tencent cos
COS_SECRET_ID = env.str(
"COS_SECRET_ID", "DEFAULT_COS_SECRET_ID"
Expand Down

0 comments on commit 88735f7

Please sign in to comment.