diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000..186c684 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,2 @@ +This is the minimal devcontainers configuration e.g. for use in VSCode or CLion. +If you don't use devcontainers, feel free to delete this directory. diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..46cd079 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,47 @@ +{ + "image": "ghcr.io/userver-framework/ubuntu-22.04-userver-pg-dev", + "remoteUser": "user", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/user/service_template,type=bind", + "workspaceFolder": "/home/user/service_template", + "runArgs": [ + "--cap-add=SYS_PTRACE", + "--security-opt", + "seccomp=unconfined" + ], + "forwardPorts": [ + 8080 + ], + "containerEnv": { + "SHELL": "/bin/bash", + "PREFIX": "${PREFIX:-~/.local}", + "CCACHE_DIR": "/home/user/service_template/.ccache", + "CORES_DIR": "/cores" + }, + "customizations": { + "vscode": { + "extensions": [ + "llvm-vs-code-extensions.vscode-clangd", + "ms-vscode.cmake-tools", + "ms-vscode.makefile-tools", + "vadimcn.vscode-lldb", + "ms-azuretools.vscode-docker" + ], + "settings": { + "cmake.automaticReconfigure": false, + "cmake.configureOnEdit": false, + "cmake.configureOnOpen": false, + "cmake.copyCompileCommands": "${workspaceFolder}/.vscode/compile_commands.json", + "clangd.path": "/usr/bin/clangd", + "clangd.arguments": [ + "--background-index", + "--compile-commands-dir=.vscode", + "--clang-tidy", + "--completion-style=detailed", + "--header-insertion=never" + ] + } + } + }, + "onCreateCommand": "sudo git config --global --add safe.directory /home/user/service_template", + "mounts": [] +} diff --git a/Makefile b/Makefile index 535ee3f..6f119cf 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,9 @@ dist-clean: rm -rf build* rm -rf tests/__pycache__/ rm -rf tests/.pytest_cache/ + rm -rf .ccache + rm -rf .vscode/.cache + rm -rf .vscode/compile_commands.json # Install .PHONY: $(addprefix install-, $(PRESETS))