mirror of
https://github.com/sml2h3/ocr_api_server.git
synced 2025-05-04 05:43:04 +08:00
添加yohe私有部署
This commit is contained in:
parent
f9e3624eff
commit
9e1cd03020
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
__pycache__
|
||||||
|
common.mk
|
@ -14,4 +14,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
# 运行应用
|
# 运行应用
|
||||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
CMD ["python", "app/main.py"]
|
12
Makefile
Normal file
12
Makefile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
include common.mk
|
||||||
|
|
||||||
|
.PHONY: build-image push-image
|
||||||
|
|
||||||
|
build-image:
|
||||||
|
docker build --pull \
|
||||||
|
-t="$(DOCKERHUB_ORGANIZATION)/$(DOCKERHUB_IMAGE):$(DOCKERHUB_TAG)" \
|
||||||
|
-f Dockerfile .
|
||||||
|
|
||||||
|
push-image:
|
||||||
|
docker login --username=$(DOCKERHUB_USERNAME) -p $(DOCKERHUB_PASSWORD) $(DOCKERHUB_REGISTRY)
|
||||||
|
docker push "$(DOCKERHUB_ORGANIZATION)/$(DOCKERHUB_IMAGE):$(DOCKERHUB_TAG)"
|
9
common.example.mk
Normal file
9
common.example.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
COMMIT_ID = $(shell git rev-parse --short HEAD || echo "HEAD")
|
||||||
|
|
||||||
|
DOCKERHUB_ORGANIZATION = registry.cn-shanghai.aliyuncs.com/muzimu
|
||||||
|
DOCKERHUB_IMAGE = yohe-ddddocr
|
||||||
|
DOCKERHUB_TAG = ${COMMIT_ID}
|
||||||
|
|
||||||
|
DOCKERHUB_USERNAME = <username>
|
||||||
|
DOCKERHUB_PASSWORD = <password>
|
||||||
|
DOCKERHUB_REGISTRY = registry.cn-shanghai.aliyuncs.com
|
Loading…
Reference in New Issue
Block a user