Skip to content

Commit 850be52

Browse files
committed
Remove docker stuff from devenv builder
1 parent 61af349 commit 850be52

File tree

3 files changed

+42
-18
lines changed

3 files changed

+42
-18
lines changed

.github/workflows/docker.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,13 @@ jobs:
6363
- name: Check out repository
6464
uses: actions/checkout@v5
6565

66-
- name: Set up Docker Buildx
67-
uses: docker/setup-buildx-action@v3
6866
- uses: cachix/install-nix-action@v31
6967
- uses: cachix/cachix-action@v16
7068
with:
7169
name: devenv
7270
- name: Install devenv.sh
7371
run: nix profile add nixpkgs#devenv
7472

75-
- name: Log in to GHCR
76-
uses: docker/login-action@v3
77-
with:
78-
registry: ghcr.io
79-
username: ${{ github.actor }}
80-
password: ${{ secrets.GITHUB_TOKEN }}
81-
8273
- name: Push image
8374
run: |
8475
cd docker/${{ matrix.image }}

docker/opencode/devenv.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
name = "opencode";
2222
registry = "docker://ghcr.io/dzervas/";
2323

24-
copyToRoot = [];
24+
# copyToRoot = [];
2525
startupCommand = "${pkgs.opencode}/bin/opencode web";
2626
};
2727
}

envs/opencode/main.jsonnet

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,22 @@ local image = 'ghcr.io/dzervas/opencode:latest';
77
local dataPath = '/data';
88
local configPath = '/config';
99

10-
local serverArgs = ['web', '--hostname', '0.0.0.0', '--port', '4096'];
1110
local configFile = configPath + '/opencode.json';
1211

1312
local 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

Comments
 (0)