Skip to content

Commit c2d3464

Browse files
hjlarryiamjoel
authored andcommitted
chore: mount config file of sandbox (#8576)
1 parent 0886c6f commit c2d3464

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

docker/docker-compose.middleware.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ services:
5656
SANDBOX_PORT: ${SANDBOX_PORT:-8194}
5757
volumes:
5858
- ./volumes/sandbox/dependencies:/dependencies
59+
- ./volumes/sandbox/conf:/conf
5960
healthcheck:
6061
test: [ "CMD", "curl", "-f", "http://localhost:8194/health" ]
6162
networks:
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
app:
2+
port: 8194
3+
debug: True
4+
key: dify-sandbox
5+
max_workers: 4
6+
max_requests: 50
7+
worker_timeout: 5
8+
python_path: /usr/local/bin/python3
9+
enable_network: True # please make sure there is no network risk in your environment
10+
allowed_syscalls: # please leave it empty if you have no idea how seccomp works
11+
proxy:
12+
socks5: ''
13+
http: ''
14+
https: ''
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
app:
2+
port: 8194
3+
debug: True
4+
key: dify-sandbox
5+
max_workers: 4
6+
max_requests: 50
7+
worker_timeout: 5
8+
python_path: /usr/local/bin/python3
9+
python_lib_path:
10+
- /usr/local/lib/python3.10
11+
- /usr/lib/python3.10
12+
- /usr/lib/python3
13+
- /usr/lib/x86_64-linux-gnu
14+
- /etc/ssl/certs/ca-certificates.crt
15+
- /etc/nsswitch.conf
16+
- /etc/hosts
17+
- /etc/resolv.conf
18+
- /run/systemd/resolve/stub-resolv.conf
19+
- /run/resolvconf/resolv.conf
20+
- /etc/localtime
21+
- /usr/share/zoneinfo
22+
- /etc/timezone
23+
# add more paths if needed
24+
python_pip_mirror_url: https://pypi.tuna.tsinghua.edu.cn/simple
25+
nodejs_path: /usr/local/bin/node
26+
enable_network: True
27+
allowed_syscalls:
28+
- 1
29+
- 2
30+
- 3
31+
# add all the syscalls which you require
32+
proxy:
33+
socks5: ''
34+
http: ''
35+
https: ''

0 commit comments

Comments
 (0)