Ved Gupta commited on
Commit
64a3eee
·
1 Parent(s): 7e9893a
Files changed (2) hide show
  1. Dockerfile +0 -5
  2. app/core/config.py +3 -1
Dockerfile CHANGED
@@ -9,27 +9,22 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
9
 
10
  RUN --mount=type=secret,id=ALGORITHM,mode=0444,required=true \
11
  file_contents=$(cat /run/secrets/ALGORITHM) && \
12
- echo "ALGORITHM: $file_contents" && \
13
  export ALGORITHM="$file_contents"
14
 
15
  RUN --mount=type=secret,id=SERVER_NAME,mode=0444,required=true \
16
  file_contents=$(cat /run/secrets/SERVER_NAME) && \
17
- echo "SERVER_NAME: $file_contents" && \
18
  export SERVER_NAME="$file_contents"
19
 
20
  RUN --mount=type=secret,id=SECRET_KEY,mode=0444,required=true \
21
  file_contents=$(cat /run/secrets/SECRET_KEY) && \
22
- echo "SECRET_KEY: $file_contents" && \
23
  export SECRET_KEY="$file_contents"
24
 
25
  RUN --mount=type=secret,id=SERVER_HOST,mode=0444,required=true \
26
  file_contents=$(cat /run/secrets/SERVER_HOST) && \
27
- echo "SERVER_HOST: $file_contents" && \
28
  export SERVER_HOST="$file_contents"
29
 
30
  RUN --mount=type=secret,id=POSTGRES_DATABASE_URL,mode=0444,required=true \
31
  file_contents=$(cat /run/secrets/POSTGRES_DATABASE_URL) && \
32
- echo "POSTGRES_DATABASE_URL: $file_contents" && \
33
  export POSTGRES_DATABASE_URL="$file_contents"
34
 
35
 
 
9
 
10
  RUN --mount=type=secret,id=ALGORITHM,mode=0444,required=true \
11
  file_contents=$(cat /run/secrets/ALGORITHM) && \
 
12
  export ALGORITHM="$file_contents"
13
 
14
  RUN --mount=type=secret,id=SERVER_NAME,mode=0444,required=true \
15
  file_contents=$(cat /run/secrets/SERVER_NAME) && \
 
16
  export SERVER_NAME="$file_contents"
17
 
18
  RUN --mount=type=secret,id=SECRET_KEY,mode=0444,required=true \
19
  file_contents=$(cat /run/secrets/SECRET_KEY) && \
 
20
  export SECRET_KEY="$file_contents"
21
 
22
  RUN --mount=type=secret,id=SERVER_HOST,mode=0444,required=true \
23
  file_contents=$(cat /run/secrets/SERVER_HOST) && \
 
24
  export SERVER_HOST="$file_contents"
25
 
26
  RUN --mount=type=secret,id=POSTGRES_DATABASE_URL,mode=0444,required=true \
27
  file_contents=$(cat /run/secrets/POSTGRES_DATABASE_URL) && \
 
28
  export POSTGRES_DATABASE_URL="$file_contents"
29
 
30
 
app/core/config.py CHANGED
@@ -12,7 +12,9 @@ class Settings(BaseSettings):
12
  PROJECT_NAME: str = "Whisper API"
13
  PROJECT_VERSION: str = "0.1.0"
14
  SECRET_KEY: str = env.get("SECRET_KEY")
15
- ACCESS_TOKEN_EXPIRE_MINUTES: int = env.get("ACCESS_TOKEN_EXPIRE_MINUTES") or 60 * 24 * 7
 
 
16
 
17
  SERVER_NAME: str = env.get("SERVER_NAME")
18
  SERVER_HOST: AnyHttpUrl = env.get("SERVER_HOST")
 
12
  PROJECT_NAME: str = "Whisper API"
13
  PROJECT_VERSION: str = "0.1.0"
14
  SECRET_KEY: str = env.get("SECRET_KEY")
15
+ ACCESS_TOKEN_EXPIRE_MINUTES: int = (
16
+ env.get("ACCESS_TOKEN_EXPIRE_MINUTES") or 60 * 24 * 7
17
+ )
18
 
19
  SERVER_NAME: str = env.get("SERVER_NAME")
20
  SERVER_HOST: AnyHttpUrl = env.get("SERVER_HOST")