Add configuration-files for developing the project using docker
This commit is contained in:
parent
6e424a7710
commit
2b347775c4
13
.devcontainer/.env
Normal file
13
.devcontainer/.env
Normal file
|
@ -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
|
7
.devcontainer/devcontainer.json
Normal file
7
.devcontainer/devcontainer.json
Normal file
|
@ -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"
|
||||
}
|
16
.devcontainer/docker-compose.yml
Normal file
16
.devcontainer/docker-compose.yml
Normal file
|
@ -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
|
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -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
|
||||
|
|
41
package-lock.json
generated
41
package-lock.json
generated
|
@ -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": {
|
||||
|
|
3
test/website/index.html
Normal file
3
test/website/index.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<h1>
|
||||
Hello World
|
||||
</h1>
|
Loading…
Reference in a new issue