Merge pull request #2319 from lbssousa/devcontainer
Add sample configuration for Visual Studio Code Remote Development
This commit is contained in:
commit
c09261e99e
9
.devcontainer/devcontainer.example.json
Normal file
9
.devcontainer/devcontainer.example.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Laradock",
|
||||
"dockerComposeFile": ["../docker-compose.yml"],
|
||||
"runServices": ["nginx", "postgres", "pgadmin"],
|
||||
"service": "workspace",
|
||||
"workspaceFolder": "/var/www",
|
||||
"shutdownAction": "stopCompose",
|
||||
"postCreateCommand": "uname -a"
|
||||
}
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -13,4 +13,7 @@
|
||||
/nginx/ssl/*.key
|
||||
/nginx/ssl/*.csr
|
||||
|
||||
.DS_Store
|
||||
/.devcontainer/*
|
||||
!/.devcontainer/devcontainer.example.json
|
||||
|
||||
.DS_Store
|
||||
|
@ -70,6 +70,16 @@ If you want to only execute some command and don't want to enter bash, you can e
|
||||
docker-compose run workspace php artisan migrate
|
||||
```
|
||||
|
||||
### Prepare for Visual Studio Code remote development
|
||||
|
||||
If you want to use Visual Studio Code for [remote development](https://code.visualstudio.com/docs/remote/containers) directly on your `workspace` container, copy file `devcontainer.example.json` to `devcontainer.json` and customize it (see [devcontainer.json reference](https://code.visualstudio.com/docs/remote/containers#_devcontainerjson-reference) for more options):
|
||||
```
|
||||
cd .devcontainer
|
||||
cp devcontainer.example.json devcontainer.json
|
||||
```
|
||||
|
||||
Then open your `laradock` folder in Visual Studio Code and click on popup button **Reopen in Container**.
|
||||
|
||||
### Install and configure Laravel
|
||||
|
||||
Let's install Laravel's dependencies, add the `.env` file, generate the key and give proper permissions to the cache folder.
|
||||
|
Loading…
Reference in New Issue
Block a user