Allow the project to be run in a docker-volume
This commit is contained in:
parent
3af6253c56
commit
1337771f59
3 changed files with 12 additions and 7 deletions
|
@ -2,10 +2,9 @@
|
||||||
"name": "SilverStripe Environment",
|
"name": "SilverStripe Environment",
|
||||||
"dockerComposeFile": "docker-compose.yml",
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
"service": "silverstripe",
|
"service": "silverstripe",
|
||||||
"workspaceFolder": "/vscode/src/mantra",
|
"workspaceFolder": "/shared-workspaces/mantra",
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"adrianhumphreys.silverstripe",
|
"adrianhumphreys.silverstripe",
|
||||||
"dbaeumer.vscode-eslint",
|
|
||||||
"felixfbecker.php-pack",
|
"felixfbecker.php-pack",
|
||||||
"ms-vscode.vscode-typescript-tslint-plugin",
|
"ms-vscode.vscode-typescript-tslint-plugin",
|
||||||
"neilbrayfield.php-docblocker"
|
"neilbrayfield.php-docblocker"
|
||||||
|
@ -13,5 +12,5 @@
|
||||||
"settings": {
|
"settings": {
|
||||||
"php.executablePath": null
|
"php.executablePath": null
|
||||||
},
|
},
|
||||||
"postCreateCommand": "echo '* text=auto eol=lf' > $(git rev-parse --git-dir)/info/attributes"
|
"postCreateCommand": "bash ./.devcontainer/post-create.sh"
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,11 +16,11 @@ services:
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
- 3001:3001
|
- 3001:3001
|
||||||
- 9000:9000
|
- 9000:9000
|
||||||
|
working_dir: /shared-workspaces/mantra
|
||||||
volumes:
|
volumes:
|
||||||
- ..:/vscode/src/mantra
|
- ..:/shared-workspaces/mantra
|
||||||
- ../test/website:/var/www/html
|
- main-node:/shared-workspaces/mantra/node_modules/
|
||||||
- main-node:/vscode/src/mantra/node_modules/
|
- main-composer:/shared-workspaces/mantra/vendor/
|
||||||
- main-composer:/vscode/src/mantra/vendor/
|
|
||||||
db:
|
db:
|
||||||
image: mysql:5
|
image: mysql:5
|
||||||
env_file: devcontainer.env
|
env_file: devcontainer.env
|
||||||
|
|
6
.devcontainer/post-create.sh
Normal file
6
.devcontainer/post-create.sh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
echo '* text=auto eol=lf' > $(git rev-parse --git-dir)/info/attributes
|
||||||
|
rm -rf /var/www/html
|
||||||
|
ln -sT `pwd`/test/website /var/www/html
|
||||||
|
chown -R www-data:www-data ./test/website
|
||||||
|
chown -R www-data:www-data /var/www/html
|
Loading…
Reference in a new issue