Skip to content

Commit

Permalink
feat: add dev-container documentation (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
rishtigupta authored Nov 6, 2024
1 parent 3ca97df commit 2394b93
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"customizations" : {
"jetbrains" : {
"backend" : "IntelliJ",
"plugins": ["com.jetbrains.php"],
"plugins": ["com.jetbrains.php"]
}
},

Expand All @@ -23,7 +23,7 @@

"containerEnv": {
"MOMENTO_API_KEY": "${localEnv:MOMENTO_API_KEY}"
},
}

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html"
Expand Down
22 changes: 20 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,35 @@ Happy coding :dancer:

Check out our SDK documentation for [requirements](https://docs.momentohq.com/sdks/php#requirements)!

## Build Docker Image
## Setup
There are two ways to setup your development environment:


## Option 1: Build Docker Image

You will likely need to run this only once:

```bash
./dev-docker-build.sh
```

## Run Integration Tests
### Run Integration Tests

```bash
export MOMENTO_API_KEY=<YOUR_API_KEY>
./dev-run-integration-tests.sh
```

## Option 2: Running a Dev Container in IntelliJ IDEA
- Open the `.devcontainer/devcontainer.json` file (present in the root of this repository) in IntelliJ IDEA.
- In the left gutter, click and select `Create Dev Container and Mount Sources`.
- This will create and launch a development container with all necessary dependencies pre-installed.

You can now develop and test the SDK in the container.

## Option 3: Running a Dev Container in Visual Studio Code
- Open the `.devcontainer/devcontainer.json` file (present in the root of this repository) in Visual Studio Code.
- Click on the `Reopen in Container` button in the bottom right corner.
- This will create and launch a development container with all necessary dependencies pre-installed.

You can now develop and test the SDK in the container.

0 comments on commit 2394b93

Please sign in to comment.