-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: template for nameko and apiflask
- Loading branch information
1 parent
31a55f8
commit 5b01e58
Showing
10 changed files
with
56 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
.venv | ||
venv/ | ||
venv/ | ||
local* | ||
*.env | ||
*.venv | ||
env/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
FROM python:3.11 | ||
FROM python:3.11-slim | ||
|
||
RUN python3 -m pip uninstall -y pychassislib | ||
# 拷贝依赖 | ||
COPY requirements.txt . | ||
COPY . /app | ||
# 设置工作路径 | ||
WORKDIR /app | ||
# 安装依赖 | ||
RUN python3 -m pip install -i https://mirrors.cloud.tencent.com/pypi/simple --trusted-host=mirrors.cloud.tencent.com pdm>=2.10.1 | ||
# RUN python3 -m pip install -i https://mirrors.cloud.tencent.com/pypi/simple --trusted-host=mirrors.cloud.tencent.com -r requirements.txt | ||
RUN python3 -m pdm install | ||
RUN python3 -m pip install -i https://mirrors.cloud.tencent.com/pypi/simple --trusted-host=mirrors.cloud.tencent.com -r requirements.txt | ||
# 启动时运行命令 | ||
CMD ["sh", "docker-deploy.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: "3.8" | ||
|
||
services: | ||
apiflask-api: | ||
image: gitea.bearcatlog.com/bryant/apiflask-api:latest | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile |
27 changes: 27 additions & 0 deletions
27
src/pychassiscli/templates/apiflask/docker-compose-run.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: "3.8" | ||
|
||
services: | ||
apiflask-api: | ||
image: gitea.bearcatlog.com/bryant/apiflask-api:latest | ||
env_file: | ||
- .apiflaskenv | ||
- .apiflask.env | ||
ports: | ||
- "5000:5000" | ||
deploy: | ||
mode: replicated | ||
replicas: 6 | ||
update_config: | ||
parallelism: 3 | ||
failure_action: rollback | ||
restart_policy: | ||
condition: on-failure | ||
delay: 5s | ||
max_attempts: 3 | ||
window: 120s | ||
networks: | ||
- apiflask-api-network | ||
|
||
networks: | ||
apiflask-api-network: | ||
driver: overlay |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pychassislib[nameko,apiflask,schema] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
FROM python:3.11 | ||
FROM python:3.11-slim | ||
|
||
RUN python3 -m pip uninstall -y pychassislib | ||
# 拷贝依赖 | ||
COPY . /app | ||
# 设置工作路径 | ||
WORKDIR /app | ||
# 安装依赖 | ||
RUN python3 -m pip install -i https://mirrors.cloud.tencent.com/pypi/simple --trusted-host=mirrors.cloud.tencent.com pdm>=2.10.1 | ||
RUN python3 -m pdm install | ||
RUN python3 -m pip install -i https://mirrors.cloud.tencent.com/pypi/simple --trusted-host=mirrors.cloud.tencent.com -r requirements.txt | ||
# 启动时运行命令 | ||
CMD ["sh", "docker-deploy.sh", "./body_record/config.yml", "body_record.body_record"] | ||
CMD ["sh", "docker-deploy.sh", "./admin/config.yml", "admin.admin"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: "3" | ||
version: "3.8" | ||
|
||
services: | ||
nameko-service: | ||
|