fix(auth): 更新数据库配置并修正Dockerfile文件路径
将PostgreSQL和Redis的host从本地地址更新为服务名称 修正Dockerfile中的文件拷贝路径和启动命令 添加swagger-ui静态文件拷贝配置
This commit is contained in:
parent
001d0abca2
commit
e9ef32a215
@ -5,8 +5,10 @@ WORKDIR /home/booksystem/auth
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
|
||||
COPY .. .
|
||||
COPY . .
|
||||
|
||||
COPY swagger-ui /home/booksystem/swagger-ui
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["python", "app.py"]
|
||||
CMD ["python", "main.py"]
|
||||
|
||||
Binary file not shown.
@ -6,7 +6,7 @@ from urllib.parse import quote_plus
|
||||
class PostgreSQLSettings(BaseSettings):
|
||||
"""PostgreSQL数据库配置"""
|
||||
|
||||
host: str = "127.0.0.1"
|
||||
host: str = "postgres"
|
||||
port: int = 5432
|
||||
user: str = "admin"
|
||||
password: str = "PostgresAdmin@123"
|
||||
@ -27,7 +27,7 @@ class PostgreSQLSettings(BaseSettings):
|
||||
class RedisSettings(BaseSettings):
|
||||
"""Redis配置"""
|
||||
|
||||
host: str = "127.0.0.1"
|
||||
host: str = "redis"
|
||||
port: int = 6379
|
||||
password: Optional[str] = "RedisAdmin@123"
|
||||
db: int = 0
|
||||
|
||||
|
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
BIN
swagger-ui/favicon-32x32.png
Normal file
BIN
swagger-ui/favicon-32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 628 B |
2
swagger-ui/swagger-ui-bundle.js
Normal file
2
swagger-ui/swagger-ui-bundle.js
Normal file
File diff suppressed because one or more lines are too long
3
swagger-ui/swagger-ui.css
Normal file
3
swagger-ui/swagger-ui.css
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user