diff --git a/.devcontainer/.env b/.devcontainer/.env new file mode 100644 index 0000000..95f9c61 --- /dev/null +++ b/.devcontainer/.env @@ -0,0 +1,3 @@ +REDIS_CONN_STRING="redis://db:6379/" +AXUM_HOST_STRING="0.0.0.0:30000" +RUST_LOG="distributed_arcade" \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..de8c135 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +{ + "name": "Distributed Arcade", + "dockerComposeFile": "docker-compose.yml", + "service": "app", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + + "customizations": { + "vscode": { + "settings": { + "lldb.executable": "/usr/bin/lldb", + "files.watcherExclude": { + "**/target/**": true + }, + "rust-analyzer.checkOnSave.command": "clippy" + }, + "extensions": [ + "vadimcn.vscode-lldb", + "mutantdino.resourcemonitor", + "rust-lang.rust-analyzer" + ] + } + }, + + "forwardPorts": [30000] +} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000..c324b19 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +volumes: + postgres-data: + +services: + app: + image: "mcr.microsoft.com/devcontainers/rust" + command: sleep infinity + + security_opt: + - "seccomp:unconfined" + cap_add: + - "SYS_PTRACE" + + volumes: + - "../..:/workspaces:cached" + env_file: ".env" + + db: + image: "redis" + restart: unless-stopped