From 5310583878c01a1554e3ef066c89ae027271ec8f Mon Sep 17 00:00:00 2001 From: despiegk Date: Sun, 15 Dec 2024 19:43:21 +0100 Subject: [PATCH] ... --- .devcontainer/Dockerfile | 16 ++++++++++++ .devcontainer/check.sh | 7 ++++++ .devcontainer/devcontainer.json | 39 ++++++++++++++++++++++++++++++ crystallib.code-workspace | 23 ++++++++++++++++++ examples/crystallib.code-workspace | 13 ++-------- push_code.sh | 2 +- tools/workspace | 23 ++++++++++++++++++ 7 files changed, 111 insertions(+), 12 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100755 .devcontainer/check.sh create mode 100644 .devcontainer/devcontainer.json create mode 100644 crystallib.code-workspace create mode 100644 tools/workspace diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..1ec1939bd --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:24.04 + +# Avoid prompts from apt +ENV DEBIAN_FRONTEND=noninteractive + +# Install essential build tools and dependencies +RUN apt-get update && apt-get install -y \ + git gcc make clang libssl-dev sqlite3 libsqlite3-dev mc htop + +# Install V +RUN git clone https://github.com/vlang/v /opt/vlang \ + && cd /opt/vlang \ + && make \ + && ln -s /opt/vlang/v /usr/local/bin/v + +CMD ["redis-server"] \ No newline at end of file diff --git a/.devcontainer/check.sh b/.devcontainer/check.sh new file mode 100755 index 000000000..986a1fc75 --- /dev/null +++ b/.devcontainer/check.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# if [ -z "${DEPLOYKEY}" ]; then +# echo "ERROR: DEPLOYKEY environment variable is not set" +# exit 1 +# fi + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..08f501d37 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,39 @@ +{ + "name": "Crystallib Development", + "build": { + "dockerfile": "Dockerfile" + }, + "workspaceFolder": "/root/code/github/freeflowuniverse/crystallib", + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": true, + "configureZshAsDefaultShell": true, + "installOhMyZsh": true, + "upgradePackages": true + } + }, + "customizations": { + "vscode": { + "extensions": [ + "vlanguage.vscode-vlang", + "saoudrizwan.claude-dev", + "ms-vscode.vscode-typescript-next", + "mhutchie.git-graph" + ] + } + }, + "initializeCommand":"./.devcontainer/check.sh", + "privileged":true, + "mounts": [ + "source=${localEnv:HOME}/code,target=/root/code,type=bind,consistency=cached" + ], + "forwardPorts": [3000, 6379], + "portsAttributes": { + "3000": { + "label": "Hello Remote World", + "onAutoForward": "notify" + } + }, + // "postStartCommand": "bun run start", + "remoteUser": "root" +} diff --git a/crystallib.code-workspace b/crystallib.code-workspace new file mode 100644 index 000000000..d2ff8e8ea --- /dev/null +++ b/crystallib.code-workspace @@ -0,0 +1,23 @@ +{ + "folders": [ + { + "path": "/root/code/github/freeflowuniverse/crystallib/crystallib" + }, + { + "path": "/root/code/github/freeflowuniverse/crystallib/aiprompts" + }, + { + "path": "/root/code/github/freeflowuniverse/crystallib/c/root/code/github/freeflowuniverse/crystallib/hero" + }, + { + "path": "/root/code/github/freeflowuniverse/crystallib/scripts" + }, + { + "path": "/root/code/github/freeflowuniverse/crystallib/examples" + }, + { + "path": "/root/code/github/freeflowuniverse/crystallib/cli" + } + ], + "settings": {} +} \ No newline at end of file diff --git a/examples/crystallib.code-workspace b/examples/crystallib.code-workspace index bec3812eb..d2ef42ae8 100644 --- a/examples/crystallib.code-workspace +++ b/examples/crystallib.code-workspace @@ -3,27 +3,18 @@ { "path": "../crystallib" }, - { - "path": "." - }, { "path": "../aiprompts" }, { "path": "../cli/hero" }, - { - "path": "../vscodeplugin" - }, { "path": "../scripts" }, { - "path": "../research" - }, - { - "path": "../tools" - }, + "path": "../examples" + }, { "path": "../cli" } diff --git a/push_code.sh b/push_code.sh index 28b7d277d..91f17d998 100755 --- a/push_code.sh +++ b/push_code.sh @@ -7,4 +7,4 @@ cd "$MYDIR" echo "Enter the commit message:" read commit_message -git add . -A ; git commit -m "$commit_message"; git pull ; git push \ No newline at end of file +git add . -A ; git commit -m "$commit_message"; git pull ; git push diff --git a/tools/workspace b/tools/workspace new file mode 100644 index 000000000..d2ff8e8ea --- /dev/null +++ b/tools/workspace @@ -0,0 +1,23 @@ +{ + "folders": [ + { + "path": "/root/code/github/freeflowuniverse/crystallib/crystallib" + }, + { + "path": "/root/code/github/freeflowuniverse/crystallib/aiprompts" + }, + { + "path": "/root/code/github/freeflowuniverse/crystallib/c/root/code/github/freeflowuniverse/crystallib/hero" + }, + { + "path": "/root/code/github/freeflowuniverse/crystallib/scripts" + }, + { + "path": "/root/code/github/freeflowuniverse/crystallib/examples" + }, + { + "path": "/root/code/github/freeflowuniverse/crystallib/cli" + } + ], + "settings": {} +} \ No newline at end of file