added tasting code
This commit is contained in:
3
.devcontainer/Dockerfile
Normal file
3
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM rust:1-bookworm
|
||||
RUN apt update && apt upgrade -y && apt install fish -y
|
||||
RUn rustup component add clippy rustfmt
|
||||
55
.devcontainer/devcontainer.json
Normal file
55
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,55 @@
|
||||
// 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": "Rust",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"dockerComposeFile": "docker-compose.yml",
|
||||
"service": "app",
|
||||
"workspaceFolder": "/workspace",
|
||||
|
||||
// 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": {
|
||||
// "ghcr.io/meaningful-ooo/devcontainer-features/fish:1": {}
|
||||
// },
|
||||
"mounts": [
|
||||
"source=/home/tobi/.ssh,target=/home/vscode/.ssh,type=bind"
|
||||
],
|
||||
|
||||
|
||||
// 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": "git clone https://gitea.maiertobi.de/tobimai/dotfiles.git /home/vscode/dotfiles && cargo install cargo-tarpaulin",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"serayuzgur.crates",
|
||||
"tamasfe.even-better-toml",
|
||||
"vadimcn.vscode-lldb",
|
||||
"mutantdino.resourcemonitor",
|
||||
"rust-lang.rust-analyzer",
|
||||
"ms-azuretools.vscode-docker"
|
||||
],
|
||||
"settings": {
|
||||
"terminal.integrated.defaultProfile.linux": "Fish",
|
||||
"terminal.integrated.profiles.linux": {
|
||||
"Fish": {
|
||||
"path": "fish"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
||||
32
.devcontainer/docker-compose.yml
Normal file
32
.devcontainer/docker-compose.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
version: '3'
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: .devcontainer/Dockerfile
|
||||
volumes:
|
||||
- ..:/workspace:cached
|
||||
command: sleep infinity
|
||||
|
||||
db:
|
||||
image: postgres
|
||||
environment:
|
||||
POSTGRES_USER: dev
|
||||
POSTGRES_PASSWORD: dev
|
||||
POSTGRES_DB: iot
|
||||
ports:
|
||||
- 5432:5432
|
||||
command: ["postgres", "-c", "log_statement=all"]
|
||||
|
||||
adminer:
|
||||
image: michalhosna/adminer
|
||||
environment:
|
||||
ADMINER_DB: iot
|
||||
ADMINER_DRIVER: pgsql
|
||||
ADMINER_SERVER: db
|
||||
ADMINER_USERNAME: dev
|
||||
ADMINER_PASSWORD: dev
|
||||
ADMINER_AUTOLOGIN: 1
|
||||
ADMINER_NAME: IOT DEVELOPMENT
|
||||
ports:
|
||||
- 1111:8080
|
||||
Reference in New Issue
Block a user