Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Dev Container Configuration #105

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
60 changes: 60 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "SurrealDB Python SDK Dev Container",
"image": "mcr.microsoft.com/devcontainers/python:3",
"features": {
"ghcr.io/devcontainers/features/rust:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"rust-lang.rust-analyzer",
"eamodio.gitlens",
"VisualStudioExptTeam.vscodeintellicode",
"usernamehw.errorlens",
"aaron-bond.better-comments"
]
},
"codespaces": {
"openFiles": ["README.md"]
}
},

"forwardPorts": [8000, 8001, 8002, 8003, 8004, 8005, 8006],
"portsAttributes": {
"8000": {
"label": "v1.2.1 Testing",
"onAutoForward": "silent"
},
"8001": {
"label": "v1.2.0 Testing",
"onAutoForward": "silent"
},
"8002": {
"label": "v1.0.1 Testing",
"onAutoForward": "silent"
},
"8003": {
"label": "v1.1.1 Testing",
"onAutoForward": "silent"
},
"8004": {
"label": "v1.1.0 Testing",
"onAutoForward": "silent"
},
"8005": {
"label": "v1.0.1 Testing",
"onAutoForward": "silent"
},
"8006": {
"label": "v1.0.0 Testing",
"onAutoForward": "silent"
}
},



"postCreateCommand": "sudo cp .devcontainer/welcome.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt",
"postStartCommand": "/bin/bash ./.devcontainer/setup.sh"
}
8 changes: 8 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

pip install -r requirements.txt -r dev_requirements.txt -e . docker&
cargo build&

wait

echo "Setup completed"
6 changes: 6 additions & 0 deletions .devcontainer/welcome.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
👋 Welcome to SurrealDB's Python SDK! You are on a custom defined configuration!
- This environment has Python and Rust installed

💻 To get started, check out the README.md file or run './scripts/run_tests.sh'

📝 Edit away, run your app as usual, and we'll automatically make it available for you to access.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

<br>

<p align="center">
<a href="https://codespaces.new/surrealdb/surrealdb.py">
<img src="https://github.com/codespaces/badge.svg" alt="Open in GitHub Codespaces" />
</a>
</p>

<p align="center">
<a href="https://github.com/surrealdb/surrealdb.py"><img src="https://img.shields.io/badge/status-beta-ff00bb.svg?style=flat-square"></a>
&nbsp;
Expand Down