feature/devcontainer #15
60
.devcontainer/devcontainer.json
Normal file
60
.devcontainer/devcontainer.json
Normal file
@@ -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"
|
||||
}
|
||||
19
.devcontainer/start.sh
Normal file
19
.devcontainer/start.sh
Normal file
@@ -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."
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -29,3 +29,4 @@ target
|
||||
generated-config.yaml
|
||||
|
||||
node_modules/
|
||||
.pnpm-store/
|
||||
|
||||
Reference in New Issue
Block a user