Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"version": "2.7.1",
"resolved": "ghcr.io/devcontainers/features/common-utils@sha256:e76a6a8a35d1ad824daad1540725e0ec9f8ed2dc00d2850e990a9830013c7d08",
"integrity": "sha256:e76a6a8a35d1ad824daad1540725e0ec9f8ed2dc00d2850e990a9830013c7d08"
},
"ghcr.io/devcontainers/features/docker-in-docker:4": {
"version": "4.1.3",
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:fae40f3c8be5a7c3b0db344c1d30341bc2c91ba38d1d5b14cd2ad72e6d65d084",
"integrity": "sha256:fae40f3c8be5a7c3b0db344c1d30341bc2c91ba38d1d5b14cd2ad72e6d65d084"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "1.1.3",
"resolved": "ghcr.io/devcontainers/features/github-cli@sha256:bd7ab48a832228f633239277552c30b353867fef2e5b037e064b4e64f0b843f2",
Expand Down
28 changes: 6 additions & 22 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,16 @@
"dockerComposeFile": "docker-compose.yml",
"service": "devcontainer",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
"mounts": [
{
"source": "devcontainer-cargo-cache-${devcontainerId}",
"target": "/usr/local/cargo",
"type": "volume"
},
{
"source": "devcontainer-rustup-cache-${devcontainerId}",
"target": "/usr/local/rustup",
"type": "volume"
}
],
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/docker-in-docker:4": {
"moby": false
},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./scripts/init-devcontainer.sh",
"postCreateCommand": "./.devcontainer/init.sh",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
Expand All @@ -35,15 +26,8 @@
},
"extensions": [
"bytecodealliance.wit-idl",
"github.vscode-github-actions",
"ms-azuretools.vscode-containers",
"rust-lang.rust-analyzer",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"vadimcn.vscode-lldb"
"tamasfe.even-better-toml"
]
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
14 changes: 12 additions & 2 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
version: '3.8'
name: componentized-valkey
services:
devcontainer:
image: mcr.microsoft.com/devcontainers/rust
volumes:
- ../..:/workspaces:cached
- ..:/workspaces/valkey
- devcontainer-cargo-cache:/usr/local/cargo:volume
- devcontainer-rustup-cache:/usr/local/rustup:volume
command: sleep infinity
network_mode: service:valkey
depends_on:
Expand All @@ -12,3 +14,11 @@ services:
valkey:
image: valkey/valkey:9
restart: unless-stopped

volumes:
devcontainer-cargo-cache:
external: true
name: devcontainer-cargo-cache
devcontainer-rustup-cache:
external: true
name: devcontainer-rustup-cache
14 changes: 14 additions & 0 deletions .devcontainer/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
!/usr/bin/env bash

# Setup script run once for new devcontainers to init the environment.

set -euo pipefail

curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

echo "PATH=\"\$(make -s tools-path):\${PATH}\"" >> ~/.zshrc
echo "PATH=\"\$(make -s tools-path):\${PATH}\"" >> ~/.bashrc

make tools wit

cargo check
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
- package-ecosystem: cargo
directory: "/"
schedule:
Expand Down
Loading