Fix podman-run script, add git to nextcloud

This commit is contained in:
Ben 2021-10-09 15:50:15 +02:00
parent e92ca2c39e
commit f7a66afea8
Signed by: ben
GPG key ID: 0F54A7ED232D3319
3 changed files with 108 additions and 38 deletions

View file

@ -11,7 +11,7 @@
"repositories": [ "repositories": [
{ {
"type": "vcs", "type": "vcs",
"url": "https://github.com/bziemons/matrix-php-sdk.git" "url": "https://gitea.rs485.network/UPschooling/matrix-php-sdk.git"
} }
], ],
"require": { "require": {

128
composer.lock generated
View file

@ -4,22 +4,16 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "4f8aeff7f36c2b13932751ca0c8eb5cd", "content-hash": "ebcdd7dd09ac660354e0302e45d5c254",
"packages": [ "packages": [
{ {
"name": "aryess/php-matrix-sdk", "name": "aryess/php-matrix-sdk",
"version": "dev-feature/guzzle7-update", "version": "dev-feature/guzzle7-update",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/bziemons/matrix-php-sdk.git", "url": "https://gitea.rs485.network/UPschooling/matrix-php-sdk.git",
"reference": "f0d759e56bf7013c1b0d9936acd1406ebcfcecb9" "reference": "f0d759e56bf7013c1b0d9936acd1406ebcfcecb9"
}, },
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bziemons/matrix-php-sdk/zipball/f0d759e56bf7013c1b0d9936acd1406ebcfcecb9",
"reference": "f0d759e56bf7013c1b0d9936acd1406ebcfcecb9",
"shasum": ""
},
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"guzzlehttp/guzzle": "7.2.0", "guzzlehttp/guzzle": "7.2.0",
@ -33,6 +27,7 @@
"phpunit/php-code-coverage": "^7.0", "phpunit/php-code-coverage": "^7.0",
"phpunit/phpunit": "^8.5" "phpunit/phpunit": "^8.5"
}, },
"default-branch": true,
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -70,9 +65,6 @@
"keywords": [ "keywords": [
"PhpMatrixSdk" "PhpMatrixSdk"
], ],
"support": {
"source": "https://github.com/bziemons/matrix-php-sdk/tree/feature/guzzle7-update"
},
"time": "2021-09-19T12:54:20+00:00" "time": "2021-09-19T12:54:20+00:00"
}, },
{ {
@ -179,16 +171,16 @@
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
"version": "1.4.1", "version": "1.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/promises.git", "url": "https://github.com/guzzle/promises.git",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" "reference": "136a635e2b4a49b9d79e9c8fee267ffb257fdba0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", "url": "https://api.github.com/repos/guzzle/promises/zipball/136a635e2b4a49b9d79e9c8fee267ffb257fdba0",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "reference": "136a635e2b4a49b9d79e9c8fee267ffb257fdba0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -200,7 +192,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.4-dev" "dev-master": "1.5-dev"
} }
}, },
"autoload": { "autoload": {
@ -216,10 +208,25 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com", "email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling" "homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
} }
], ],
"description": "Guzzle promises library", "description": "Guzzle promises library",
@ -228,22 +235,36 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/promises/issues", "issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.4.1" "source": "https://github.com/guzzle/promises/tree/1.5.0"
}, },
"time": "2021-03-07T09:25:29+00:00" "funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
"type": "tidelift"
}
],
"time": "2021-10-07T13:05:22+00:00"
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "1.8.2", "version": "1.8.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91" "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", "url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91", "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -280,13 +301,34 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com", "email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling" "homepage": "https://github.com/mtdowling"
}, },
{
"name": "George Mponos",
"email": "gmponos@gmail.com",
"homepage": "https://github.com/gmponos"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com",
"homepage": "https://github.com/sagikazarmark"
},
{ {
"name": "Tobias Schultze", "name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion" "homepage": "https://github.com/Tobion"
} }
], ],
@ -303,9 +345,23 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/1.8.2" "source": "https://github.com/guzzle/psr7/tree/1.8.3"
}, },
"time": "2021-04-26T09:17:50+00:00" "funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
"type": "tidelift"
}
],
"time": "2021-10-05T13:56:00+00:00"
}, },
{ {
"name": "psr/http-client", "name": "psr/http-client",
@ -1353,16 +1409,16 @@
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
"version": "1.5.0", "version": "1.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git", "url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1397,9 +1453,9 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": { "support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues", "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0" "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1"
}, },
"time": "2021-09-17T15:28:14+00:00" "time": "2021-10-02T14:08:47+00:00"
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
@ -1767,16 +1823,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "8.5.20", "version": "8.5.21",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "9deefba183198398a09b927a6ac6bc1feb0b7b70" "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9deefba183198398a09b927a6ac6bc1feb0b7b70", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984",
"reference": "9deefba183198398a09b927a6ac6bc1feb0b7b70", "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1848,7 +1904,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.20" "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.21"
}, },
"funding": [ "funding": [
{ {
@ -1860,7 +1916,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2021-08-31T06:44:38+00:00" "time": "2021-09-25T07:37:20+00:00"
}, },
{ {
"name": "psr/cache", "name": "psr/cache",

View file

@ -9,7 +9,13 @@ DIR="${0%/*}"
podman rm -if synapse podman rm -if synapse
podman rm -if nextcloud podman rm -if nextcloud
podman run -d --name=nextcloud -p 8080:80 -p 8008:8008 -v "$DIR:/var/www/html/custom_apps/upschooling" docker.io/nextcloud if [[ ! -d vendor ]]; then
make composer
fi
podman run -d --name=nextcloud -p 8080:80 -p 8008:8008 -v "$DIR:/var/www/html/custom_apps/upschooling" \
--add-host "synapse:127.0.0.1" docker.io/nextcloud
podman exec nextcloud bash -c 'apt-get update && apt-get install -y git'
podman exec nextcloud chown -R 33 /var/www/html/custom_apps podman exec nextcloud chown -R 33 /var/www/html/custom_apps
"$DIR/podman-reown.sh" "$DIR/podman-reown.sh"
podman exec --user 33 nextcloud bash -c 'cd /var/www/html/custom_apps/upschooling && make composer' podman exec --user 33 nextcloud bash -c 'cd /var/www/html/custom_apps/upschooling && make composer'
@ -31,7 +37,15 @@ else
echo "Generated fresh synapse-data volume" echo "Generated fresh synapse-data volume"
fi fi
LOCAL_SYNAPSE_DATA_PATH="$(podman volume inspect --format "{{.Mountpoint}}" synapse-data)"
if [ $(id -u) -eq 0 ];then
sed -i 's|macaroon_secret_key: .*|macaroon_secret_key: "~d9fJpPKDZIV67A7=tPCvok:=fTBLV;MFf=9FRxtAazW@-GwSo"|' "$LOCAL_SYNAPSE_DATA_PATH/homeserver.yaml"
else
podman unshare -- sed -i 's|macaroon_secret_key: .*|macaroon_secret_key: "~d9fJpPKDZIV67A7=tPCvok:=fTBLV;MFf=9FRxtAazW@-GwSo"|' "$LOCAL_SYNAPSE_DATA_PATH/homeserver.yaml"
fi
podman run -d \ podman run -d \
--log-driver "k8s-file" \
--name=synapse \ --name=synapse \
"--mount=type=volume,src=synapse-data,dst=/data" \ "--mount=type=volume,src=synapse-data,dst=/data" \
"--network=container:$(podman inspect --format "{{.Id}}" nextcloud)" \ "--network=container:$(podman inspect --format "{{.Id}}" nextcloud)" \