diff --git a/.devcontainer/.env b/.devcontainer/.env new file mode 100644 index 0000000..2defcf8 --- /dev/null +++ b/.devcontainer/.env @@ -0,0 +1,13 @@ +SS_ENVIRONMENT_TYPE=dev +SS_BASE_URL=http://localhost + +SS_DATABASE_CLASS=MySQLPDODatabase +SS_DATABASE_SERVER=db +MYSQL_DATABASE=SilverStripe +SS_DATABASE_NAME=SilverStripe +SS_DATABASE_USERNAME=root +MYSQL_ROOT_PASSWORD=root +SS_DATABASE_PASSWORD=root + +SS_DEFAULT_ADMIN_USERNAME=admin +SS_DEFAULT_ADMIN_PASSWORD=admin \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..2b439f8 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,7 @@ +{ + "name": "SilverStripe Environment", + "dockerComposeFile": "docker-compose.yml", + "service": "silverstripe", + "workspaceFolder": "/vscode/src/mantra", + "postCreateCommand": "rm -rf /var/www/html && ln -fs ${workspaceFolder}/test/website -t /var/www html" +} \ No newline at end of file diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000..aa4a351 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' + +services: + silverstripe: + image: manuth/silverstripe-dev + env_file: .env + ports: + - 8080:80 + volumes: + - ..:/vscode/src/mantra + - ../test/website:/var/www/html + db: + image: mysql:5 + env_file: .env + volumes: + - ./mysql-data:/var/lib/mysql \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1c33d5e..8c8fe64 100644 --- a/.gitignore +++ b/.gitignore @@ -54,9 +54,6 @@ typings/ # Yarn Integrity file .yarn-integrity -# dotenv environment variables file -.env - # parcel-bundler cache (https://parceljs.org/) .cache @@ -77,3 +74,6 @@ typings/ # Composer-dependencies vendor/ + +# MySQL cache +.devcontainer/mysql-data diff --git a/package-lock.json b/package-lock.json index 5a696f6..e16647e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -125,6 +125,17 @@ "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } } }, "append-buffer": { @@ -471,14 +482,6 @@ "path-is-absolute": "^1.0.0", "readdirp": "^2.2.1", "upath": "^1.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - } } }, "class-utils": { @@ -2368,13 +2371,10 @@ } }, "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "now-and-later": { "version": "2.0.1", @@ -3495,6 +3495,17 @@ "now-and-later": "^2.0.0", "remove-bom-buffer": "^3.0.0", "vinyl": "^2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } } }, "which": { diff --git a/test/website/index.html b/test/website/index.html new file mode 100644 index 0000000..a9ae888 --- /dev/null +++ b/test/website/index.html @@ -0,0 +1,3 @@ +

+ Hello World +

\ No newline at end of file