为容器增加限制
This commit is contained in:
@@ -3,5 +3,15 @@ version: "3"
|
||||
services:
|
||||
build_self:
|
||||
build: .
|
||||
container_name: build_self
|
||||
ports:
|
||||
- "5001:80"
|
||||
- "5001:80"
|
||||
storage_opt:
|
||||
size: 50M
|
||||
cpus: 0.5
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 100M
|
||||
reservations:
|
||||
memory: 100M
|
||||
1
main.py
1
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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user