Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications for a working docker-based local environment #113

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html": "${workspaceRoot}"
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": ["-dxdebug.start_with_request=yes"],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
31 changes: 31 additions & 0 deletions README-DOCKER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Docker Setup

After cloning <https://github.com/oat-sa/package-tao>, do the following:

1. `docker compose up -d`
2. `./shell.sh composer install`
3. Run install script in app container:

```shell
docker exec -it --user www-data tao_phpfpm php tao/scripts/taoInstall.php \
--db_driver pdo_mysql \
--db_host tao_db \
--db_name tao \
--db_user tao \
--db_pass tao \
--file_path /var/www/html/data \
--module_namespace http://sample/first.rdf \
--module_url http://tao.localhost \
--instance_name tao \
--user_login admin \
--user_pass admin \
-vvv -e taoCe
```

4. Access site at `http://tao.localhost`

## To add extensions

```shell
docker run -it --rm --mount src=`pwd`,target=/app,type=bind --workdir /app joeniland/laravel-ci:8.1-20240612 composer require oat-sa/extension-tao-devtools --dev
```
21 changes: 19 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,24 @@
"homepage": "http://www.taotesting.com",
"minimum-stability": "stable",
"prefer-stable": true,
"repositories": [
{
"type": "git",
"url": "https://github.com/joe-niland/taoExtensionTest.git"
}
],
"require": {
"oat-sa/tao-community": "2022.11.6"
"oat-sa/tao-community": "2024.08.1",
"joe-niland/tao-extension-test": "dev-main"
},
"config": {
"allow-plugins": {
"php-http/discovery": true,
"oat-sa/oatbox-extension-installer": true,
"oat-sa/composer-npm-bridge": true
}
},
"require-dev": {
"oat-sa/extension-tao-devtools": "^8.10"
}
}
}
Loading