Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_data_contracts_from_file
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
take_data_contracts_from_file
Commits
8811c35b
Commit
8811c35b
authored
Apr 08, 2026
by
Vũ Hoàng Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: serve index.html directly on root and update docker port mapping to 8000
parent
371783cc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
app.py
app.py
+6
-1
docker-compose.yml
docker-compose.yml
+2
-1
No files found.
app.py
View file @
8811c35b
...
@@ -29,9 +29,14 @@ _static_dir = os.path.join(os.path.dirname(__file__), "static")
...
@@ -29,9 +29,14 @@ _static_dir = os.path.join(os.path.dirname(__file__), "static")
if
os
.
path
.
isdir
(
_static_dir
):
if
os
.
path
.
isdir
(
_static_dir
):
app
.
mount
(
"/static"
,
StaticFiles
(
directory
=
_static_dir
,
html
=
True
),
name
=
"static"
)
app
.
mount
(
"/static"
,
StaticFiles
(
directory
=
_static_dir
,
html
=
True
),
name
=
"static"
)
from
fastapi.responses
import
FileResponse
@
app
.
get
(
"/"
)
@
app
.
get
(
"/"
)
async
def
root
():
async
def
root
():
return
RedirectResponse
(
url
=
"/static/index.html"
)
index_path
=
os
.
path
.
join
(
_static_dir
,
"index.html"
)
if
os
.
path
.
exists
(
index_path
):
return
FileResponse
(
index_path
)
return
{
"error"
:
"index.html not found"
}
def
_looks_like_low_information_markdown
(
md_text
:
str
)
->
bool
:
def
_looks_like_low_information_markdown
(
md_text
:
str
)
->
bool
:
...
...
docker-compose.yml
View file @
8811c35b
...
@@ -7,7 +7,7 @@ services:
...
@@ -7,7 +7,7 @@ services:
container_name
:
doc-converter
container_name
:
doc-converter
restart
:
unless-stopped
restart
:
unless-stopped
ports
:
ports
:
-
"
5005
:8000"
-
"
8000
:8000"
dns
:
dns
:
-
8.8.8.8
# DNS của Google
-
8.8.8.8
# DNS của Google
-
1.1.1.1
# DNS của Cloudflare
-
1.1.1.1
# DNS của Cloudflare
...
@@ -16,6 +16,7 @@ services:
...
@@ -16,6 +16,7 @@ services:
-
./docx_converter.py:/app/docx_converter.py
-
./docx_converter.py:/app/docx_converter.py
-
./ocr_drive.py:/app/ocr_drive.py
-
./ocr_drive.py:/app/ocr_drive.py
-
./ocr_service_account.json:/app/ocr_service_account.json
-
./ocr_service_account.json:/app/ocr_service_account.json
-
./text_to_markdown.py:/app/text_to_markdown.py
extra_hosts
:
extra_hosts
:
-
"
host.docker.internal:host-gateway"
-
"
host.docker.internal:host-gateway"
command
:
[
"
uvicorn"
,
"
app:app"
,
"
--host"
,
"
0.0.0.0"
,
"
--port"
,
"
8000"
,
"
--reload"
]
command
:
[
"
uvicorn"
,
"
app:app"
,
"
--host"
,
"
0.0.0.0"
,
"
--port"
,
"
8000"
,
"
--reload"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment