From 44ef312811ecad50f3c6fd6aee52474d38212473 Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 31 Dec 2023 18:15:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E5=AE=B9=E5=99=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 12 +++++++++++- main.py | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index aac6522..3a2e03d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,5 +3,15 @@ version: "3" services: build_self: build: . + container_name: build_self ports: - - "5001:80" \ No newline at end of file + - "5001:80" + storage_opt: + size: 50M + cpus: 0.5 + deploy: + resources: + limits: + memory: 100M + reservations: + memory: 100M \ No newline at end of file diff --git a/main.py b/main.py index cfa6933..052c61b 100644 --- a/main.py +++ b/main.py @@ -28,6 +28,7 @@ def open_selected_file(): def save_file_content(): with open(st.session_state.page_file['filepath'], 'w', encoding='utf-8') as f: + logger.debug(f"save: <\n{st.session_state.file_content}\n>to file {st.session_state.page_file['filepath']}") f.write(st.session_state.file_content)