diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..dcbc60f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,60 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/rust +{ + "name": "YANPM", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/rust:2-1-trixie", + "features": { + "ghcr.io/devcontainers/features/java:1": { + "version": "latest", + "jdkDistro": "open", + "gradleVersion": "latest", + "mavenVersion": "latest", + "antVersion": "latest", + "groovyVersion": "latest" + }, + "ghcr.io/dhoeric/features/act:1": {}, + "ghcr.io/guiyomh/features/just:0": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/node:1": { + "nodeGypDependencies": true, + "version": "22", + "pnpmVersion": "latest", + "nvmVersion": "latest" + }, + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "moby": false, + "azureDnsAutoDetection": true, + "installDockerBuildx": true, + "installDockerComposeSwitch": true, + "disableIp6tables": true, + "version": "latest", + "dockerDashComposeVersion": "v2" + } + }, + + // Use 'mounts' to make the cargo cache persistent in a Docker Volume. + // "mounts": [ + // { + // "source": "devcontainer-cargo-cache-${devcontainerId}", + // "target": "/usr/local/cargo", + // "type": "volume" + // } + // ] + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "bash .devcontainer/start.sh" + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/start.sh b/.devcontainer/start.sh new file mode 100644 index 0000000..b72f592 --- /dev/null +++ b/.devcontainer/start.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +echo "Starting devcontainer setup..." + +echo "Installing dependencies..." +# install dependencies +pnpm install --frozen-lockfile +cargo install sea-orm-cli + +echo "building agent image..." +# build agent image +cd apps/agent +just build-docker +cd - +echo "Agent image built." + +echo "Devcontainer setup complete." diff --git a/.gitignore b/.gitignore index 94559b6..4006a08 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ target generated-config.yaml node_modules/ +.pnpm-store/