Allow the project to be run in a docker-volume

This commit is contained in:
Manuel Thalmann 2021-05-10 23:10:12 +00:00
parent 3af6253c56
commit 1337771f59
3 changed files with 12 additions and 7 deletions

View file

@ -2,10 +2,9 @@
"name": "SilverStripe Environment",
"dockerComposeFile": "docker-compose.yml",
"service": "silverstripe",
"workspaceFolder": "/vscode/src/mantra",
"workspaceFolder": "/shared-workspaces/mantra",
"extensions": [
"adrianhumphreys.silverstripe",
"dbaeumer.vscode-eslint",
"felixfbecker.php-pack",
"ms-vscode.vscode-typescript-tslint-plugin",
"neilbrayfield.php-docblocker"
@ -13,5 +12,5 @@
"settings": {
"php.executablePath": null
},
"postCreateCommand": "echo '* text=auto eol=lf' > $(git rev-parse --git-dir)/info/attributes"
"postCreateCommand": "bash ./.devcontainer/post-create.sh"
}

View file

@ -16,11 +16,11 @@ services:
- 3000:3000
- 3001:3001
- 9000:9000
working_dir: /shared-workspaces/mantra
volumes:
- ..:/vscode/src/mantra
- ../test/website:/var/www/html
- main-node:/vscode/src/mantra/node_modules/
- main-composer:/vscode/src/mantra/vendor/
- ..:/shared-workspaces/mantra
- main-node:/shared-workspaces/mantra/node_modules/
- main-composer:/shared-workspaces/mantra/vendor/
db:
image: mysql:5
env_file: devcontainer.env

View 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