@@ -7,27 +7,22 @@ local image = 'ghcr.io/dzervas/opencode:latest';
77local dataPath = '/data' ;
88local configPath = '/config' ;
99
10- local serverArgs = ['web' , '--hostname' , '0.0.0.0' , '--port' , '4096' ];
1110local configFile = configPath + '/opencode.json' ;
1211
1312local opencode = dockerService.new('opencode' , image, {
1413 namespace: namespace,
1514 ports: [4096 ],
1615 fqdn: 'opencode.vpn.dzerv.art' ,
17- runAsUser: 1000 ,
1816
19- command: ['opencode' ],
20- args: serverArgs,
17+ labels: { 'ai/enable' : 'true' },
2118
2219 env: {
2320 TZ: timezone,
2421 OPENCODE_CONFIG: configFile,
2522 XDG_DATA_HOME: dataPath,
2623 },
2724
28- op_envs: {
29- OPENCODE_SERVER_PASSWORD: 'server-password' ,
30- },
25+ // op_envs: { OPENCODE_SERVER_PASSWORD: 'password' },
3126
3227 pvs: {
3328 [dataPath]: {
@@ -41,15 +36,53 @@ local opencode = dockerService.new('opencode', image, {
4136 },
4237});
4338
44- local configMap = k.core.v1.configMap.new('opencode-config' )
39+ local configMap =
40+ k.core.v1.configMap.new('opencode-config' )
4541 + k.core.v1.configMap.metadata.withNamespace(namespace)
4642 + k.core.v1.configMap.withData({
4743 'opencode.json' : std.manifestJsonEx ({
4844 '$schema' : 'https://opencode.ai/config.json' ,
45+ autoupdate: false ,
4946 server: {
5047 hostname: '0.0.0.0' ,
5148 port: 4096 ,
49+ cors: ['http://opencode.vpn.dzerv.art' ],
50+ },
51+ provider: {
52+ dz: {
53+ models: {
54+ 'gemini-3-pro-preview' : {
55+ name: 'gemini-3-pro' ,
56+ },
57+ 'gemini-claude-opus-4-5-thinking' : {
58+ name: 'opus-4.5' ,
59+ },
60+ 'gemini-sonnet-claude-4-5-thinking' : {
61+ name: 'sonnet-4.5' ,
62+ },
63+ 'glm-4.7' : {
64+ name: 'glm-4.7' ,
65+ },
66+ 'gpt-5.2(high)' : {
67+ name: 'gpt-5.2' ,
68+ },
69+ 'gpt-5.2-codex(high)' : {
70+ name: 'gpt-5.2-codex-high' ,
71+ },
72+ 'gpt-5.2-codex(medium)' : {
73+ name: 'gpt-5.2-codex' ,
74+ },
75+ },
76+ name: 'DZervArt' ,
77+ npm: '@ai-sdk/anthropic' ,
78+ options: {
79+ apiKey: 'sk-dummy' ,
80+ baseURL: 'https://ai.vpn.dzerv.art/v1' ,
81+ },
82+ },
5283 },
84+ share: 'disabled' ,
85+ small_model: 'dz/glm-4.7' ,
5386 }, ' ' ),
5487 });
5588
0 commit comments