Replaced apps docker container names
parent
b9f486b586
commit
022b32c864
|
@ -0,0 +1,15 @@
|
|||
[submodule "docker/jitsi/src"]
|
||||
path = docker/jitsi/src
|
||||
url = https://github.com/jitsi/docker-jitsi-meet.git
|
||||
[submodule "docker/onlyoffice/src"]
|
||||
path = docker/onlyoffice/src
|
||||
url = https://github.com/aleho/onlyoffice-ce-docker-license.git
|
||||
[submodule "docker/wordpress/src"]
|
||||
path = docker/wordpress/src
|
||||
url = https://github.com/nezhar/wordpress-docker-compose.git
|
||||
[submodule "docker/moodle/src"]
|
||||
path = docker/moodle/src
|
||||
url = https://github.com/erseco/alpine-moodle.git
|
||||
[submodule "docker/moodle/rootfs-php7"]
|
||||
path = docker/moodle/rootfs-php7
|
||||
url = https://github.com/erseco/alpine-php7-webserver.git
|
|
@ -0,0 +1,30 @@
|
|||
[submodule "docker/nextcloud/src"]
|
||||
path = docker/nextcloud/src
|
||||
url = https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud
|
||||
branch = master
|
||||
[submodule "docker/jitsi/src"]
|
||||
path = docker/jitsi/src
|
||||
url = https://github.com/jitsi/docker-jitsi-meet.git
|
||||
branch = master
|
||||
[submodule "docker/cryptpad/src"]
|
||||
path = docker/cryptpad/src
|
||||
url = https://github.com/xwiki-labs/cryptpad-docker.git
|
||||
branch = master
|
||||
[submodule "docker/alpha-bbb/src"]
|
||||
path = docker/alpha-bbb/src
|
||||
url = https://github.com/bigbluebutton/docker.git
|
||||
[submodule "docker/bbb/src"]
|
||||
path = docker/bbb/src
|
||||
url = https://github.com/alangecker/bigbluebutton-docker.git
|
||||
[submodule "docker/onlyoffice_build/build_tools"]
|
||||
path = docker/onlyoffice_build/build_tools
|
||||
url = https://github.com/ONLYOFFICE/build_tools.git
|
||||
[submodule "docker/onlyoffice/src"]
|
||||
path = docker/onlyoffice/src
|
||||
url = https://github.com/aleho/onlyoffice-ce-docker-license.git
|
||||
[submodule "docker/wordpress/src"]
|
||||
path = docker/wordpress/src
|
||||
url = https://github.com/nezhar/wordpress-docker-compose.git
|
||||
[submodule "docker/etherpad/src"]
|
||||
path = docker/etherpad/src
|
||||
url = https://github.com/Jamesits/docker-etherpad-lite
|
|
@ -0,0 +1,82 @@
|
|||
#!make
|
||||
include main.conf
|
||||
export $(shell sed 's/=.*//' main.conf)
|
||||
|
||||
VERSION := 0.0.1-rc0
|
||||
export VERSION
|
||||
|
||||
BUILD_ROOT_PATH=$(shell pwd)
|
||||
|
||||
#all: tidy gen test build docker
|
||||
#.PHONY: all
|
||||
|
||||
all: moodle nextcloud
|
||||
cp main.conf .env
|
||||
echo "BUILD_ROOT_PATH=$(BUILD_ROOT_PATH)" >> .env
|
||||
cp .env docker/postgresql
|
||||
cp .env docker/mariadb
|
||||
cp .env docker/moodle
|
||||
cp .env docker/nextcloud
|
||||
cp .env docker/wordpress
|
||||
docker-compose -f docker/moodle/moodle.yml \
|
||||
-f docker/nextcloud/nextcloud.yml \
|
||||
-f docker/wordpress/wordpress.yml \
|
||||
-f docker/redis/redis.yml \
|
||||
-f docker/postgresql/postgresql.yml \
|
||||
-f docker/mariadb/mariadb.yml \
|
||||
-f docker/network.yml \
|
||||
config > docker-compose.yml
|
||||
|
||||
environment:
|
||||
cp main.conf .env
|
||||
echo "BUILD_ROOT_PATH=$(BUILD_ROOT_PATH)" >> .env
|
||||
cp .env docker/postgresql
|
||||
# cp .env docker/
|
||||
# . ./.env
|
||||
|
||||
moodle: environment
|
||||
cp .env docker/moodle
|
||||
docker-compose -f docker/moodle/moodle.yml \
|
||||
-f docker/postgresql/postgresql.yml \
|
||||
-f docker/network.yml \
|
||||
config > docker-compose.moodle.yml
|
||||
|
||||
nextcloud: environment
|
||||
cp .env docker/nextcloud
|
||||
cp .env docker/redis
|
||||
docker-compose -f docker/nextcloud/nextcloud.yml \
|
||||
-f docker/postgresql/postgresql.yml \
|
||||
-f docker/redis/redis.yml \
|
||||
-f docker/network.yml \
|
||||
config > docker-compose.nextcloud.yml
|
||||
|
||||
wordpress: environment
|
||||
cp .env docker/wordpress
|
||||
docker-compose -f docker/wordpress/wordpress.yml \
|
||||
-f docker/mariadb/mariadb.yml \
|
||||
-f docker/network.yml \
|
||||
config > docker-compose.wordpress.yml
|
||||
|
||||
init-dbs: environment
|
||||
MOODLE="\set AUTOCOMMIT on\n; \
|
||||
CREATE USER $(MOODLE_POSTGRES_USER) SUPERUSER PASSWORD '$(MOODLE_POSTGRES_PASSWORD)'; \
|
||||
CREATE DATABASE moodle; \
|
||||
GRANT ALL PRIVILEGES ON DATABASE moodle TO $(MOODLE_POSTGRES_USER);"
|
||||
docker-compose exec isard-apps-postgresql psql -v ON_ERROR_STOP=1 \
|
||||
--username $(POSTGRES_USER) <<-EOSQL $(MOODLE) EOSQL
|
||||
|
||||
remove-moodle-db: environment
|
||||
docker-compose exec isard-apps-postgresql psql -v ON_ERROR_STOP=1 \
|
||||
--username $(POSTGRES_USER) -c "\set AUTOCOMMIT on\n; \
|
||||
DROP DATABASE moodle;"
|
||||
|
||||
reset-nextcloud: environment
|
||||
docker-compose stop isard-apps-nextcloud-nginx isard-apps-nextcloud-app
|
||||
rm -rf /opt/isard-office/nextcloud
|
||||
docker-compose exec isard-apps-postgresql psql -v ON_ERROR_STOP=1 \
|
||||
--username $(POSTGRES_USER) -c "\set AUTOCOMMIT on\n; \
|
||||
DROP DATABASE nextcloud; \
|
||||
CREATE USER $(NEXTCLOUD_POSTGRES_USER) SUPERUSER PASSWORD '$(NEXTCLOUD_POSTGRES_PASSWORD)'; \
|
||||
CREATE DATABASE nextcloud; \
|
||||
GRANT ALL PRIVILEGES ON DATABASE nextcloud TO $(NEXTCLOUD_POSTGRES_USER);"
|
||||
docker-compose up -d isard-apps-nextcloud-nginx isard-apps-nextcloud-app
|
|
@ -0,0 +1,249 @@
|
|||
# KEYCLOAK
|
||||
|
||||
## Create sample users
|
||||
|
||||
1. https://sso.<domain>
|
||||
|
||||
# Moodle
|
||||
|
||||
1. Activate SAML2 plugin
|
||||
2. Regenerate SP certificate: https://moodle.<domain>/auth/saml2/regenerate.php
|
||||
3. Download SAML2 Service Provider xml: https://moodle.<domain>/auth/saml2/sp/metadata.php
|
||||
4. Import this SP in keycloak IDP: https://sso.<domain>/auth/admin/master/console/#/create/client/poc
|
||||
5. Add builtin email, givenname and surname field mappers (https://sso.<domain>/auth/admin/master/console/#/realms/poc/clients/b7781aac-5aa5-441a-8af5-aca7cc0a1daf/mappers)
|
||||
6. Copy keycloak SAML IDP xml data (https://sso.<domain>/auth/realms/poc/protocol/saml/descriptor) to moodle (IdP metadata xml OR public xml URL: https://moodle.<domain>/admin/settings.php?section=authsettingsaml2). Note that you should copy it from a text editor, not the content from the browser view!
|
||||
|
||||
## Configuration
|
||||
|
||||
- Auto create users: Yes
|
||||
- Role Mapping: Configure the same roles you created in keycloak for users (administratos, course creators and managers)
|
||||
- Mapping idP: username
|
||||
- Data mapping: (with this fields moodle will skip user profile fill as this three are the only required)
|
||||
- Name: givenName
|
||||
- Surname(s): sn
|
||||
- Email: email
|
||||
- Dual login: No
|
||||
- This will redirect moodle login automatically to keycloak login. To access as local moodle admin add to url: /login/index.php?saml=off
|
||||
|
||||
At keycloak side create a basic user property 'username' for this client mappers.
|
||||
|
||||
## Fields returned from keycloak
|
||||
|
||||
Authed!
|
||||
|
||||
array(3) {
|
||||
["sn"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(5) "admin"
|
||||
}
|
||||
["givenName"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(5) "admin"
|
||||
}
|
||||
["Role"]=>
|
||||
array(6) {
|
||||
[0]=>
|
||||
string(20) "manage-account-links"
|
||||
[1]=>
|
||||
string(12) "view-profile"
|
||||
[2]=>
|
||||
string(6) "admins"
|
||||
[3]=>
|
||||
string(14) "offline_access"https://github.com/bigbluebutton/bigbluebutton/issues/9406
|
||||
[4]=>
|
||||
string(17) "uma_authorization"
|
||||
[5]=>
|
||||
string(14) "manage-account"
|
||||
}
|
||||
}
|
||||
IdP: https://sso.<domain>/auth/realms/poc
|
||||
|
||||
Groups could be added by adding the correct mapping in keycloak moodle client?
|
||||
|
||||
## SAML2 Plugin development environment
|
||||
|
||||
All this have to be done as the image doesn't let html external folder mounted as volume (image doesn't use root)
|
||||
|
||||
1. Start isard-apps-moodle docker with default config. Wait for moodle to be ready.
|
||||
2. Enter docker and copy html to external folder:
|
||||
1. docker exec -ti isard-apps-moodle /bin/sh
|
||||
2. cd /var/www/html
|
||||
3. mkdir /var/www/moodledata/html
|
||||
4. cp -R . /var/www/moodledata/html
|
||||
|
||||
Now you open two terminals:
|
||||
|
||||
- docker exec -ti isard-apps-moodle /bin/sh
|
||||
- docker logs isard-apps-moodle --follow
|
||||
|
||||
You can edit saml2 plugin from host (/opt/isard-office/moodle/data/html/auth/saml2) and copy it to the current html folder:
|
||||
|
||||
- /var/www/html/auth/saml2 $ cp -R /var/www/moodledata/html/auth/saml2/* .
|
||||
|
||||
When you finish developing get the new plugin code into a zip and in the correct src folder:
|
||||
|
||||
- cd ${DATA_FOLDER}/moodle/data/html/auth/ && zip -r <src git path>/isard-office/docker/moodle/plugins/auth_saml2.zip saml2
|
||||
|
||||
## SAML2 Plugin src
|
||||
|
||||
The modified source files are:
|
||||
|
||||
- auth.php (lines 570 to 595, sync_roles call added)
|
||||
- locallib.php (function sync_roles)
|
||||
|
||||
Also the common plugin setup fields and lang strings:
|
||||
|
||||
- settings.php (lines 314 to 333)
|
||||
- lang/en/auth_saml2.php (lines 24 to 29)
|
||||
|
||||
|
||||
|
||||
# NEXTCLOUD
|
||||
|
||||
TODO: Does not map email nor friendlyname (display name). Also not tested to add quota field in keycloak and map it to nextcloud.
|
||||
|
||||
(guide: https://janikvonrotz.ch/2020/04/21/configure-saml-authentication-for-nextcloud-with-keycloack/)
|
||||
|
||||
1. Get keycloak realm RSA Certificate (not public key): https://sso.<domain>/auth/admin/master/console/#/realms/poc/keys
|
||||
2. Generate Nextcloud SP keys: openssl req -nodes -new -x509 -keyout private.key -out public.cert
|
||||
3. Install saml plugin. Select integrated configuration at first config page.
|
||||
4. Configure at: https://nextcloud.<domain>/settings/admin/saml
|
||||
1. General
|
||||
1. Attribute to map de UID to.: username
|
||||
2. Optioinal display name...: anything
|
||||
2. Service Provider Data
|
||||
1. x509: public.key (generated before)
|
||||
2. Private key: private.key (generated before)
|
||||
3. Identity Provider Data
|
||||
1. Identifier of the IdP: https://sso.<domain>/auth/realms/poc
|
||||
2. URL target of the IdP: https://sso.<domain>/auth/realms/poc/protocol/saml
|
||||
3. URL Location of the IdP SLO request: https://sso.<domain>/auth/realms/poc/protocol/saml
|
||||
4. Public X.509 certificate: (The RSA Certificate from keycloak at step 1).
|
||||
4. Attribute mapping
|
||||
1. email: email
|
||||
2. user groups: Role
|
||||
5. Security Settings (check only this)
|
||||
1. Signatures and encryption offered
|
||||
1. AuthnRequest
|
||||
2. logoutRequest
|
||||
3. logoutResponse
|
||||
2. Signatures and encryption required
|
||||
1. Response
|
||||
2. Assertion [Metadata of the SP will offer this info]
|
||||
|
||||
Now click at Download metadata XML and upload to Keycloak new client.
|
||||
|
||||
1. Add Client
|
||||
1. Client SAML Endpoint: https://sso.<domain>/auth/realms/poc
|
||||
2. Mappers [[ ONLY USERNAME and ROLES WORKING. Nextcloud doesn't get email]]
|
||||
1. Name: `username`
|
||||
Mapper Type: *User Property*
|
||||
Property: `username`
|
||||
Friendly Name: `username`
|
||||
SAML Attribute Name: `username`
|
||||
SAML Attribute NameFormat: *Basic*
|
||||
2. Add builtins:Name: `email`
|
||||
Mapper Type: *User Property*
|
||||
Property: `email`
|
||||
Friendly Name: `email`
|
||||
SAML Attribute Name: `email`
|
||||
SAML Attribute NameFormat: *Basic*
|
||||
3. Name: `roles`
|
||||
Mapper Type: *Role List*
|
||||
Role attribute name: `Roles`
|
||||
Friendly Name: `Roles`
|
||||
SAML Attribute NameFormat: *Basic*
|
||||
Single Role Attribute: *On*
|
||||
|
||||
[Not needed?]
|
||||
This is in left menú Client Scopes
|
||||
|
||||
In addition the *Single Role Attribute* option needs to be enabled in a different section. Navigate to *Configure > Client scopes > role_list > Mappers > role_list* and toggle the *Single Role Attribute* to *On*.
|
||||
|
||||
https://sso.<domain>/auth/admin/master/console/#/realms/poc/client-scopes/4d5db543-f636-44d4-b250-c7fa902ab454/mappers/83dff066-9ecc-4785-8a56-b83373f1c9d2
|
||||
|
||||
|
||||
|
||||
https://nextcloud.<domain>/login?direct=1
|
||||
|
||||
## Debug
|
||||
|
||||
Edit /opt/isard-office/nextcloud/html/config/config.php
|
||||
|
||||
<?php
|
||||
$CONFIG = array (
|
||||
'debug' => true,
|
||||
|
||||
# Big Blue Button
|
||||
|
||||
TODO:
|
||||
|
||||
- Audio fails with docker in iptables=false and managed by firewalld in masquerade mode. This is due to coturn that doesn't like being behind nat.
|
||||
- Firewalld + BBB: As BBB will 'take' the host interface we should:
|
||||
- Remove /etc/docker/daemon.json the iptables: false
|
||||
- firewall-cmd --zone=public --remove-interface=docker0 --permanent
|
||||
- firewall-cmd --zone=docker --add-interface=docker0 --permanent
|
||||
- Now the docker applies iptables as per container. Note that we don't have control over this from now on.
|
||||
- Scalelite
|
||||
- Script creation of base debian with virt-install and then replicate BBBs (partially done)
|
||||
|
||||
## WORDPRESS
|
||||
Client Id in keycloak has to be 'php-saml' if not set at wordpress saml plugin.
|
||||
|
||||
1. Install OneLogin SAML plugin
|
||||
2. STATUS
|
||||
1. Enable
|
||||
3. IDENTITY PROVIDER SETTINGS
|
||||
1. iDp ENTITY ID: Anything you want
|
||||
1. SSO Service Url: https://sso.digitaldemocratic.net/auth/realms/poc/protocol/saml
|
||||
2. SLO Service Url: https://sso.digitaldemocratic.net/auth/realms/poc/protocol/saml
|
||||
3. X.509 Certificate: Copy the Certificate (not the Public key) from the keycloak realm (https://sso.digitaldemocratic.net/auth/admin/master/console/#/realms/poc/keys) without the begin/end lines in the cert.
|
||||
4. OPTIONS
|
||||
1. Create user if not exists
|
||||
2. Update user data
|
||||
3. Force SAML login (wait till the plugin is working. We need a way to login as admin again!)
|
||||
4. Single Log Out
|
||||
5. Match Wordpress account by: username ???
|
||||
5. ATTRIBUTE MAPPING
|
||||
1. Username: username
|
||||
2. Email: email
|
||||
4. First Name: givenName
|
||||
5. Last Name: sn
|
||||
6. Role: Role
|
||||
6. ROLE MAPPING
|
||||
1. Administrator: admins
|
||||
2. Editor: managers
|
||||
3. Author: coursecreators
|
||||
...
|
||||
4. Multiple role values...: true
|
||||
7. CUSTOMIZE ACTIONS AND LINKS
|
||||
1. Stay in WordPress after SLO
|
||||
8. ADVANCED SETTINGS
|
||||
1. Sign AuthnRequest
|
||||
2. Sign LogoutRequest
|
||||
3. Sign LogoutResponse
|
||||
4. Service Provider X.509 Certificate & Service Provider Private Key: Generate both and paste it without the begin/end lines:
|
||||
openssl req -nodes -new -x509 -keyout private.key -out public.cert
|
||||
|
||||
9. Download Service Provider metadata from top and add it to keycloak
|
||||
10. Keycloak client mappers:
|
||||
1. Name: `username`
|
||||
Mapper Type: *User Property*
|
||||
Property: `username`
|
||||
Friendly Name: `username`
|
||||
SAML Attribute Name: `username`
|
||||
SAML Attribute NameFormat: *Basic*
|
||||
2. Add builtins:Name: `email`
|
||||
Mapper Type: *User Property*
|
||||
Property: `email`
|
||||
Friendly Name: `email`
|
||||
SAML Attribute Name: `email`
|
||||
SAML Attribute NameFormat: *Basic*
|
||||
3. Name: `roles`
|
||||
Mapper Type: *Role List*
|
||||
Role attribute name: `Roles`
|
||||
Friendly Name: `Roles`
|
||||
SAML Attribute NameFormat: *Basic*
|
||||
Single Role Attribute: *On*
|
|
@ -0,0 +1,15 @@
|
|||
How To Upgrade bbb-docker
|
||||
Backup
|
||||
|
||||
if you use greenlight, create a database backup first
|
||||
|
||||
docker exec -t docker_postgres_1 pg_dumpall -c -U postgres > /root/greenlight_`date +%d-%m-%Y"_"%H_%M_%S`.sql
|
||||
|
||||
Upgrading
|
||||
|
||||
# upgrade!
|
||||
./scripts/upgrade
|
||||
|
||||
# restart updated services
|
||||
./scripts/compose up -d
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
pgbackups:
|
||||
container_name: Backup
|
||||
image: prodrigestivill/postgres-backup-local
|
||||
restart: always
|
||||
volumes:
|
||||
- ./backup:/backups
|
||||
links:
|
||||
- db:db
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
- POSTGRES_HOST=db
|
||||
- POSTGRES_DB=${DB_NAME}
|
||||
- POSTGRES_USER=${DB_USER}
|
||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||
- POSTGRES_EXTRA_OPTS=-Z9 --schema=public --blobs
|
||||
- SCHEDULE=@every 0h30m00s
|
||||
- BACKUP_KEEP_DAYS=7
|
||||
- BACKUP_KEEP_WEEKS=4
|
||||
- BACKUP_KEEP_MONTHS=6
|
||||
- HEALTHCHECK_PORT=81
|
|
@ -0,0 +1,2 @@
|
|||
#docker exec -t isard-apps-postgresql pg_dumpall -c -U admin > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
|
||||
docker exec -t isard-apps-postgresql pg_dumpall -c -U admin | gzip > ./dump_$(date +"%Y-%m-%d_%H_%M_%S").gz
|
|
@ -0,0 +1,10 @@
|
|||
cp ../.env .
|
||||
source .env
|
||||
docker-compose stop isard-apps-nextcloud-app
|
||||
docker rm isard-apps-nextcloud-app
|
||||
rm -rf /opt/isard-office/nextcloud
|
||||
|
||||
echo "DROP DATABASE nextcloud;" | docker exec -i isard-apps-postgresql psql -U admin
|
||||
docker-compose up -d isard-apps-nextcloud-app
|
||||
docker-compose restart isard-apps-nextcloud-nginx
|
||||
docker logs isard-apps-nextcloud-app --follow
|
|
@ -0,0 +1,9 @@
|
|||
cp ../.env .
|
||||
source .env
|
||||
docker-compose stop isard-apps-wordpress
|
||||
docker rm isard-apps-wordpress
|
||||
rm -rf /opt/isard-office/wordpress
|
||||
echo "DROP DATABASE wordpress;" | docker exec -i isard-apps-postgresql psql -U admin
|
||||
docker-compose up -d isard-apps-wordpress
|
||||
docker-compose restart isard-apps-wordress-cli
|
||||
docker logs isard-apps-wordpress --follow
|
|
@ -0,0 +1 @@
|
|||
gunzip < $1 | docker exec -i isard-apps-postgresql psql -U admin -d $2
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,14 @@
|
|||
# Dump whole config
|
||||
#docker exec -ti nextcloud-app /bin/sh -c "su - www-data -s /bin/sh -c 'PHP_MEMORY_LIMIT=512M php /var/www/html/occ config:list'" > nextcloud_config_20210308.json
|
||||
|
||||
# Install Social Login plugin
|
||||
#su - www-data -s /bin/sh -c 'PHP_MEMORY_LIMIT=512M php /var/www/html/occ app:install sociallogin'
|
||||
|
||||
# Redirect to mokey on login
|
||||
#su - www-data -s /bin/sh -c 'PHP_MEMORY_LIMIT=512M php /var/www/html/occ config:system:set social_login_auto_redirect true'
|
||||
|
||||
# Dump Social Login config
|
||||
#su - www-data -s /bin/sh -c 'PHP_MEMORY_LIMIT=512M php /var/www/html/occ config:list sociallogin'
|
||||
|
||||
# Import json with social login config
|
||||
#su - www-data -s /bin/sh -c 'PHP_MEMORY_LIMIT=512M php /var/www/html/occ config:import sociallogin.json'
|
|
@ -0,0 +1,5 @@
|
|||
It should be copied inside build_tools.sh and build it.
|
||||
The submodule needs recursive git submodule but don't know if it is correct.
|
||||
|
||||
We should modify image scripts to get rid of users limits (https://autoize.com/building-onlyoffice-document-server-from-source/)
|
||||
We should create an onlyoffice docker-compose that starts with those compiled files.
|
|
@ -0,0 +1,10 @@
|
|||
version: '3.7'
|
||||
services:
|
||||
onlyoffice-build:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: onlyoffice-build
|
||||
restart: "no"
|
||||
volumes:
|
||||
- ./out:/build_tools/out
|
|
@ -0,0 +1,84 @@
|
|||
FROM ubuntu:16.04
|
||||
|
||||
RUN apt update
|
||||
RUN apt-get install -yq curl apt-transport-https ca-certificates
|
||||
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
|
||||
|
||||
RUN apt-get install -y nodejs
|
||||
RUN npm install -g npm
|
||||
RUN npm install -g grunt-cli
|
||||
|
||||
RUN apt-get install --force-yes -yq \
|
||||
wget \
|
||||
build-essential \
|
||||
libcurl4-gnutls-dev \
|
||||
libglib2.0-dev \
|
||||
libgdk-pixbuf2.0-dev \
|
||||
libgtkglext1-dev \
|
||||
libatk1.0-dev \
|
||||
libcairo2-dev \
|
||||
libxml2-dev \
|
||||
libxss-dev \
|
||||
libgconf2-dev \
|
||||
default-jre \
|
||||
qt5-qmake \
|
||||
qt5-default \
|
||||
p7zip-full \
|
||||
git \
|
||||
subversion
|
||||
#libicu-dev
|
||||
|
||||
RUN mkdir /build && cd /build
|
||||
WORKDIR /build
|
||||
RUN wget https://github.com/unicode-org/icu/archive/release-58-3.tar.gz
|
||||
RUN tar xvzf release-58-3.tar.gz
|
||||
RUN cd icu-release-58-3/icu4c/source
|
||||
WORKDIR /build/icu-release-58-3/icu4c/source
|
||||
RUN ./configure
|
||||
RUN make
|
||||
RUN make install
|
||||
WORKDIR /
|
||||
RUN rm -rf build
|
||||
|
||||
RUN git clone --recursive https://github.com/ONLYOFFICE/DocumentServer.git
|
||||
WORKDIR DocumentServer
|
||||
|
||||
## server/Common/sources/constants.js
|
||||
# exports.LICENSE_CONNECTIONS = 20;
|
||||
# exports.LICENSE_CONNECTIONS = 99999;
|
||||
RUN cd core/Common/3dParty && ./make.sh
|
||||
#RUN cd DocumentServer/core/Common/3dParty
|
||||
#./make.sh
|
||||
RUN echo "XXXXXXXXXXXXXXXXXXXXXXXX"
|
||||
WORKDIR /DocumentServer/core
|
||||
RUN make
|
||||
RUN cd ../sdkjs && make
|
||||
RUN cd ../server && make
|
||||
|
||||
RUN apt-get install adduser redis-server rabbitmq-server nodejs libstdc++6 libcurl3 libxml2 libboost-regex-dev zlib1g fonts-dejavu fonts-liberation ttf-mscorefonts-installer fonts-crosextra-carlito fonts-takao-gothic fonts-opensymbol libxss1 libcairo2 xvfb libxtst6 libgconf2-4 libasound2
|
||||
|
||||
RUN for font in \
|
||||
lohit-assamese \
|
||||
lohit-bengali \
|
||||
lohit-devanagari \
|
||||
lohit-gujarati \
|
||||
lohit-kannada \
|
||||
lohit-malayalam \
|
||||
lohit-oriya \
|
||||
lohit-punjabi \
|
||||
lohit-tamil \
|
||||
lohit-tamil-classical \
|
||||
lohit-telugu \
|
||||
nanum \
|
||||
noto \
|
||||
opensans \
|
||||
padauk \
|
||||
samyak \
|
||||
samyak-fonts \
|
||||
tibetan-machine \
|
||||
ttf-khmeros-core \
|
||||
ubuntu-font-family \
|
||||
wqy-zenhei; \
|
||||
do rm -rf build/core-fonts/${font}; done
|
||||
|
||||
RUN cd ../server && sudo make install
|
|
@ -0,0 +1,12 @@
|
|||
URL_HOST=scalelite.domain
|
||||
SECRET_KEY_BASE=SEE_MANUAL
|
||||
|
||||
LOADBALANCER_SECRET=THE_SECRET_YOU_WANT_TO_USE_FOR_SCALELITE_BBB_API
|
||||
DATABASE_URL=postgresql://postgres:INSERT_DB_PASSWORD_HERE@db:5432
|
||||
REDIS_URL=redis://redis:6379
|
||||
|
||||
NGINX_SSL=true
|
||||
#SCALELITE_NGINX_EXTRA_OPTS=--mount type=bind,source=/etc/letsencrypt,target=/etc/nginx/ssl,readonly
|
||||
|
||||
SCALELITE_TAG=v1
|
||||
SCALELITE_RECORDING_DIR=/mnt/scalelite-recordings
|
|
@ -0,0 +1,75 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
greenlight:
|
||||
entrypoint: [bin/start]
|
||||
image: greenlight-local:release-v2
|
||||
container_name: greenlight-v2
|
||||
env_file: /etc/default/greenlight
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /var/log/greenlight:/usr/src/app/log
|
||||
- /opt/greenlight/storage:/usr/src/app/storage
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
image: postgres:9.5
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /opt/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=postgres
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=very_secret
|
||||
redis:
|
||||
image: redis:latest
|
||||
command: redis-server --appendonly yes
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /opt/redis:/data
|
||||
scalelite-api:
|
||||
image: blindsidenetwks/scalelite:${SCALELITE_TAG}-api
|
||||
container_name: scalelite-api
|
||||
restart: unless-stopped
|
||||
env_file: /etc/default/scalelite
|
||||
volumes:
|
||||
- ${SCALELITE_RECORDING_DIR}:/var/bigbluebutton
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
scalelite-nginx:
|
||||
image: blindsidenetwks/scalelite:${SCALELITE_TAG}-nginx
|
||||
restart: unless-stopped
|
||||
container_name: scalelite-nginx
|
||||
env_file: /etc/default/scalelite
|
||||
depends_on:
|
||||
- scalelite-api
|
||||
- db
|
||||
- redis
|
||||
volumes:
|
||||
- ${SCALELITE_RECORDING_DIR}/published:/var/bigbluebutton/published
|
||||
- /etc/ssl:/etc/nginx/ssl:ro
|
||||
- /opt/greenlight/greenlight.nginx:/etc/bigbluebutton/nginx/greenlight.nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
scalelite-poller:
|
||||
image: blindsidenetwks/scalelite:${SCALELITE_TAG}-poller
|
||||
container_name: scalelite-poller
|
||||
restart: unless-stopped
|
||||
env_file: /etc/default/scalelite
|
||||
depends_on:
|
||||
- scalelite-api
|
||||
- db
|
||||
- redis
|
||||
scalelite-recording-importer:
|
||||
image: blindsidenetwks/scalelite:${SCALELITE_TAG}-recording-importer
|
||||
container_name: scalelite-recording-importer
|
||||
restart: unless-stopped
|
||||
env_file: /etc/default/scalelite
|
||||
volumes:
|
||||
- ${SCALELITE_RECORDING_DIR}:/var/bigbluebutton
|
||||
depends_on:
|
||||
- scalelite-api
|
||||
- db
|
||||
- redis
|
|
@ -0,0 +1,34 @@
|
|||
FROM node:lts
|
||||
MAINTAINER James Swineson <jamesswineson@gmail.com>
|
||||
|
||||
ENV ETHERPAD_VERSION 1.8.13
|
||||
|
||||
ENV NODE_ENV production
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y curl unzip mysql-client supervisor gzip git python libssl-dev pkg-config build-essential && \
|
||||
rm -r /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/
|
||||
|
||||
RUN curl -SL \
|
||||
https://github.com/ether/etherpad-lite/archive/${ETHERPAD_VERSION}.zip \
|
||||
> etherpad.zip && unzip etherpad && rm etherpad.zip && \
|
||||
mv etherpad-lite-${ETHERPAD_VERSION} etherpad-lite
|
||||
|
||||
WORKDIR etherpad-lite
|
||||
|
||||
RUN bin/installDeps.sh \
|
||||
&& rm settings.json
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN sed -i 's/^node/exec\ node/' bin/run.sh
|
||||
|
||||
VOLUME /opt/etherpad-lite/var
|
||||
RUN ln -s var/settings.json settings.json
|
||||
ADD supervisor.conf /etc/supervisor/supervisor.conf
|
||||
|
||||
EXPOSE 9001
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["supervisord", "-c", "/etc/supervisor/supervisor.conf", "-n"]
|
|
@ -0,0 +1,99 @@
|
|||
#!/bin/bash
|
||||
#set -e
|
||||
|
||||
#: ${MYSQL_PORT_3306_TCP_ADDR:=mysql}
|
||||
|
||||
#if [ -z "$MYSQL_PORT_3306_TCP_ADDR" ]; then
|
||||
# echo >&2 'error: missing MYSQL_PORT_3306_TCP environment variable'
|
||||
# echo >&2 ' Did you forget to --link some_mysql_container:mysql ?'
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
# if we're linked to MySQL, and we're using the root user, and our linked
|
||||
# container has a default "root" password set up and passed through... :)
|
||||
: ${ETHERPAD_DB_USER:=root}
|
||||
if [ "$ETHERPAD_DB_USER" = 'root' ]; then
|
||||
: ${ETHERPAD_DB_PASSWORD:=$MYSQL_ENV_MYSQL_ROOT_PASSWORD}
|
||||
fi
|
||||
: ${ETHERPAD_DB_NAME:=etherpad}
|
||||
|
||||
ETHERPAD_DB_NAME=$( echo $ETHERPAD_DB_NAME | sed 's/\./_/g' )
|
||||
|
||||
if [ -z "$ETHERPAD_DB_PASSWORD" ]; then
|
||||
echo >&2 'error: missing required ETHERPAD_DB_PASSWORD environment variable'
|
||||
echo >&2 ' Did you forget to -e ETHERPAD_DB_PASSWORD=... ?'
|
||||
echo >&2
|
||||
echo >&2 ' (Also of interest might be ETHERPAD_DB_USER and ETHERPAD_DB_NAME.)'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
: ${ETHERPAD_TITLE:=Etherpad}
|
||||
: ${ETHERPAD_PORT:=9001}
|
||||
|
||||
cat settings.json
|
||||
if [ ! -f settings.json ]; then
|
||||
|
||||
# cat <<- EOF > settings.json
|
||||
# {
|
||||
# "title": "${ETHERPAD_TITLE}",
|
||||
# "ip": "0.0.0.0",
|
||||
# "port": ${ETHERPAD_PORT},
|
||||
# "maxAge": "${ETHERPAD_MAXAGE:-3600}",
|
||||
# "minify": true,
|
||||
# "dbType" : "mysql",
|
||||
# "dbSettings" : {
|
||||
# "user" : "${ETHERPAD_DB_USER}",
|
||||
# "host" : "${MYSQL_PORT_3306_TCP_ADDR}",
|
||||
# "password": "${ETHERPAD_DB_PASSWORD}",
|
||||
# "database": "${ETHERPAD_DB_NAME}"
|
||||
# },
|
||||
# EOF
|
||||
|
||||
cat <<- EOF > settings.json
|
||||
{
|
||||
"title": "${ETHERPAD_TITLE}",
|
||||
"ip": "0.0.0.0",
|
||||
"port": ${ETHERPAD_PORT},
|
||||
"maxAge": "${ETHERPAD_MAXAGE:-3600}",
|
||||
"minify": true,
|
||||
"dbType": "postgres",
|
||||
"dbSettings": {
|
||||
"user": "etherpad",
|
||||
"host": "${ETHERPAD_DB_HOST}",
|
||||
"port": 5432,
|
||||
"password": "${ETHERPAD_DB_PASSWORD}",
|
||||
"database": "${ETHERPAD_DB_NAME}",
|
||||
"charset": "utf8mb4"
|
||||
},
|
||||
EOF
|
||||
|
||||
if [ $ETHERPAD_ADMIN_PASSWORD ]; then
|
||||
|
||||
: ${ETHERPAD_ADMIN_USER:=admin}
|
||||
|
||||
cat <<- EOF >> settings.json
|
||||
"users": {
|
||||
"${ETHERPAD_ADMIN_USER}": {
|
||||
"password": "${ETHERPAD_ADMIN_PASSWORD}",
|
||||
"is_admin": true
|
||||
}
|
||||
},
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat <<- EOF >> settings.json
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat settings.json
|
||||
echo "Installing plugins..."
|
||||
if [ $ETHERPAD_PLUGINS ]; then
|
||||
IFS=',' read -r -a PLUGIN_LIST <<< "$ETHERPAD_PLUGINS"
|
||||
for PLUGIN in "${PLUGIN_LIST[@]}"
|
||||
do
|
||||
npm install ${PLUGIN}
|
||||
done
|
||||
fi
|
||||
|
||||
exec "$@"
|
|
@ -0,0 +1,39 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
etherpad:
|
||||
build:
|
||||
context: ${BUILD_ROOT_PATH}/docker/etherpad
|
||||
dockerfile: Dockerfile
|
||||
container_name: etherpad
|
||||
restart: on-failure:10
|
||||
# ports:
|
||||
# - 9001:9001
|
||||
# env_file: etherpad.env
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9001"]
|
||||
interval: 1m30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
environment:
|
||||
ETHERPAD_TITLE: Title
|
||||
ETHERPAD_PORT: 9001
|
||||
ETHERPAD_ADMIN_PASSWORD: ${ADMIN_PWD}
|
||||
ETHERPAD_ADMIN_USER: ${ADMIN_USER}
|
||||
ETHERPAD_PLUGIN: ep_adminpads,ep_headings2
|
||||
ETHERPAD_MAXAGE: 3600
|
||||
ETHERPAD_DB_USER: etherpad
|
||||
ETHERPAD_DB_PASSWORD: 3th3rpad
|
||||
ETHERPAD_API_KEY: your-api-key
|
||||
ETHERPAD_DB_NAME: etherpad
|
||||
ETHERPAD_DB_HOST: office-postgres
|
||||
networks:
|
||||
- isard_net
|
||||
|
||||
# depends_on:
|
||||
# - db
|
||||
|
||||
#volumes:
|
||||
# db:
|
|
@ -0,0 +1,22 @@
|
|||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[unix_http_server]
|
||||
file=/var/run//supervisor.sock
|
||||
chmod=0700
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///var/run//supervisor.sock
|
||||
|
||||
[program:etherpad]
|
||||
directory=/opt/etherpad-lite/bin
|
||||
command=/opt/etherpad-lite/bin/run.sh --root
|
||||
user=root
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
redirect_stderr=true
|
|
@ -0,0 +1,15 @@
|
|||
FROM haproxy:alpine as production
|
||||
RUN apk add openssl certbot py-pip
|
||||
RUN pip install pip install certbot-plugin-gandi
|
||||
|
||||
|
||||
ADD letsencrypt.sh /
|
||||
ADD letsencrypt-check.sh /
|
||||
ADD deploy-hook.sh /etc/letsencrypt/renewal-hooks/deploy/
|
||||
COPY auto-generate-certs.sh /usr/local/bin/
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
COPY auto-generate-certs.sh /
|
||||
RUN rm /docker-entrypoint.sh
|
||||
RUN ln -s /usr/local/bin/docker-entrypoint.sh /
|
||||
RUN chmod 775 docker-entrypoint.sh
|
||||
ADD haproxy.conf /usr/local/etc/haproxy/haproxy.cfg
|
|
@ -0,0 +1,32 @@
|
|||
cd /certs
|
||||
|
||||
# Self signed cert generic data
|
||||
C=CA
|
||||
L=Barcelona
|
||||
O=localdomain
|
||||
CN_CA=$O
|
||||
CN_HOST=*.$O
|
||||
OU=$O
|
||||
|
||||
echo '#### Creating 2048-bit RSA key:'
|
||||
openssl genrsa -out ca-key.pem 2048
|
||||
|
||||
echo '#### Using the key to create a self-signed certificate to your CA:'
|
||||
openssl req -new -x509 -days 9999 -key ca-key.pem -out ca-cert.pem -sha256 \
|
||||
-subj "/C=$C/L=$L/O=$O/CN=$CN_CA"
|
||||
|
||||
echo '#### Creating server certificate:'
|
||||
openssl genrsa -out server-key.pem 2048
|
||||
|
||||
echo '#### Creating a certificate signing request for the server:'
|
||||
openssl req -new -key server-key.pem -sha256 -out server-key.csr \
|
||||
-subj "/CN=$CN_HOST"
|
||||
|
||||
echo '#### Creating server certificate:'
|
||||
RND=$(( ( RANDOM % 1000 ) + 1 ))
|
||||
openssl x509 -req -days 9999 -in server-key.csr -CA ca-cert.pem -CAkey ca-key.pem \
|
||||
-set_serial $RND -sha256 -out server-cert.pem
|
||||
|
||||
echo '#### Concatenate certs for haprox'
|
||||
cat server-cert.pem server-key.pem > chain.pem
|
||||
chmod 440 *
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
prepare.sh
|
||||
|
||||
if [ ! -f /certs/chain.pem ]; then
|
||||
auto-generate-certs.sh
|
||||
fi
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- haproxy "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" = 'haproxy' ]; then
|
||||
shift # "haproxy"
|
||||
# if the user wants "haproxy", let's add a couple useful flags
|
||||
# -W -- "master-worker mode" (similar to the old "haproxy-systemd-wrapper"; allows for reload via "SIGUSR2")
|
||||
# -db -- disables background mode
|
||||
set -- haproxy -W -db "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
cat $RENEWED_LINEAGE/fullchain.pem $RENEWED_LINEAGE/privkey.pem > /certs/chain.pem
|
||||
|
||||
kill -SIGUSR2 1
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
certbot renew --cert-name $LETSENCRYPT_DOMAIN
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
if [ -f /letsencrypt-hook-deploy-concatenante.sh ]
|
||||
then
|
||||
mkdir -p /etc/letsencrypt/renewal-hooks/deploy/
|
||||
mv /letsencrypt-hook-deploy-concatenante.sh /etc/letsencrypt/renewal-hooks/deploy/concatenate.sh
|
||||
fi
|
||||
|
||||
if [ -n "$LETSENCRYPT_DOMAIN" -a -n "$LETSENCRYPT_EMAIL" ]
|
||||
then
|
||||
LETSENCRYPT_DOMAIN="$LETSENCRYPT_DOMAIN" crond
|
||||
if [ ! -f /certs/chain.pem ]
|
||||
then
|
||||
if certbot certonly --standalone -d "$LETSENCRYPT_DOMAIN" -m "$LETSENCRYPT_EMAIL" -n --agree-tos
|
||||
then
|
||||
RENEWED_LINEAGE="/etc/letsencrypt/live/$LETSENCRYPT_DOMAIN" /etc/letsencrypt/renewal-hooks/deploy/concatenate.sh
|
||||
fi
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,36 @@
|
|||
mkdir /certs
|
||||
cd /certs
|
||||
|
||||
# Self signed cert generic data
|
||||
C=CA
|
||||
L=Barcelona
|
||||
O=localdomain
|
||||
CN_CA=$O
|
||||
CN_HOST=*.$O
|
||||
OU=$O
|
||||
|
||||
echo '#### Creating 2048-bit RSA key:'
|
||||
openssl genrsa -out ca-key.pem 2048
|
||||
|
||||
echo '#### Using the key to create a self-signed certificate to your CA:'
|
||||
openssl req -new -x509 -days 9999 -key ca-key.pem -out ca-cert.pem -sha256 \
|
||||
-subj "/C=$C/L=$L/O=$O/CN=$CN_CA"
|
||||
|
||||
echo '#### Creating server certificate:'
|
||||
openssl genrsa -out server-key.pem 2048
|
||||
|
||||
echo '#### Creating a certificate signing request for the server:'
|
||||
openssl req -new -key server-key.pem -sha256 -out server-key.csr \
|
||||
-subj "/CN=$CN_HOST"
|
||||
|
||||
echo '#### Creating server certificate:'
|
||||
RND=$(( ( RANDOM % 1000 ) + 1 ))
|
||||
openssl x509 -req -days 9999 -in server-key.csr -CA ca-cert.pem -CAkey ca-key.pem \
|
||||
-set_serial $RND -sha256 -out server-cert.pem
|
||||
|
||||
|
||||
chmod 440 *
|
||||
|
||||
echo '#### Concatenate certs for haprox'
|
||||
cat server-cert.pem server-key.pem > /certs/chain.pem
|
||||
cd /
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
echo "Domain(s) $LETSENCRYPT_DNS renewed. Restarting haproxy..."
|
||||
cat /etc/letsencrypt/live/$LETSENCRYPT_DNS/fullchain.pem /etc/letsencrypt/live/$LETSENCRYPT_DNS/privkey.pem > /certs/chain.pem
|
||||
chmod 440 /certs/chain.pem
|
||||
mkdir -p /certs/letsencrypt/$LETSENCRYPT_DNS
|
||||
cp /etc/letsencrypt/live/$LETSENCRYPT_DNS/* /certs/letsencrypt/$LETSENCRYPT_DNS/
|
||||
|
||||
kill -SIGUSR2 1
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Set debug path password
|
||||
PASSWD=$(python3 -c 'import os,crypt,getpass; print(crypt.crypt(os.environ["ADMIN_PWD"], crypt.mksalt(crypt.METHOD_SHA512)))')
|
||||
sed -i "/^ user admin password/c\ user admin password $ADMIN_PWD" /usr/local/etc/haproxy/haproxy.cfg
|
||||
|
||||
#/bin/sh /letsencrypt.sh
|
||||
|
||||
if [ ! -e "/certs/chain.pem" ]; then
|
||||
auto-generate-certs.sh
|
||||
fi
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- haproxy "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" = 'haproxy' ]; then
|
||||
shift # "haproxy"
|
||||
# if the user wants "haproxy", let's add a couple useful flags
|
||||
# -W -- "master-worker mode" (similar to the old "haproxy-systemd-wrapper"; allows for reload via "SIGUSR2")
|
||||
# -db -- disables background mode
|
||||
set -- haproxy -W -db "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
|
@ -0,0 +1,82 @@
|
|||
resolvers mydns
|
||||
nameserver dns1 127.0.0.11:53
|
||||
|
||||
global
|
||||
# debug
|
||||
daemon
|
||||
log 127.0.0.1 local0
|
||||
tune.ssl.default-dh-param 2048
|
||||
|
||||
defaults
|
||||
mode http
|
||||
timeout connect 25s
|
||||
timeout client 25s
|
||||
timeout client-fin 25s
|
||||
timeout server 25s
|
||||
timeout tunnel 7200s
|
||||
option http-server-close
|
||||
option httpclose
|
||||
log global
|
||||
option httplog
|
||||
backlog 4096
|
||||
maxconn 2000
|
||||
option tcpka
|
||||
|
||||
frontend website
|
||||
mode http
|
||||
bind :80
|
||||
redirect scheme https if !{ ssl_fc }
|
||||
bind :443 ssl crt /certs/chain.pem
|
||||
|
||||
acl is_nextcloud hdr_beg(host) nextcloud.
|
||||
acl is_moodle hdr_beg(host) moodle.
|
||||
acl is_jitsi hdr_beg(host) jitsi.
|
||||
|
||||
use_backend be_nextcloud if is_nextcloud
|
||||
use_backend be_moodle if is_moodle
|
||||
use_backend be_jitsi if is_jitsi
|
||||
|
||||
default_backend be_moodle
|
||||
|
||||
backend be_moodle
|
||||
mode http
|
||||
acl existing-x-forwarded-host req.hdr(X-Forwarded-Host) -m found
|
||||
acl existing-x-forwarded-proto req.hdr(X-Forwarded-Proto) -m found
|
||||
http-request add-header X-Forwarded-Host %[req.hdr(Host)] unless existing-x-forwarded-host
|
||||
http-request add-header X-Forwarded-Proto https unless existing-x-forwarded-proto
|
||||
server moodle moodle:8080 check port 8080 inter 5s rise 2 fall 10 resolvers mydns init-addr none
|
||||
|
||||
backend be_nextcloud
|
||||
mode http
|
||||
acl existing-x-forwarded-host req.hdr(X-Forwarded-Host) -m found
|
||||
acl existing-x-forwarded-proto req.hdr(X-Forwarded-Proto) -m found
|
||||
http-request add-header X-Forwarded-Host %[req.hdr(Host)] unless existing-x-forwarded-host
|
||||
http-request add-header X-Forwarded-Proto https unless existing-x-forwarded-proto
|
||||
server nextcloud nextcloud:80 check port 80 inter 5s rise 2 fall 10 resolvers mydns init-addr none
|
||||
|
||||
backend be_jitsi
|
||||
mode http
|
||||
acl existing-x-forwarded-host req.hdr(X-Forwarded-Host) -m found
|
||||
acl existing-x-forwarded-proto req.hdr(X-Forwarded-Proto) -m found
|
||||
http-request add-header X-Forwarded-Host %[req.hdr(Host)] unless existing-x-forwarded-host
|
||||
http-request add-header X-Forwarded-Proto https unless existing-x-forwarded-proto
|
||||
server jitsi jitsi:80 check port 80 inter 5s rise 2 fall 10 resolvers mydns init-addr none
|
||||
|
||||
listen stats
|
||||
bind 0.0.0.0:8888
|
||||
mode http
|
||||
stats enable
|
||||
option httplog
|
||||
stats show-legends
|
||||
stats uri /haproxy
|
||||
stats realm Haproxy\ Statistics
|
||||
stats refresh 5s
|
||||
#stats auth staging:pep1n1ll0
|
||||
#acl authorized http_auth(AuthUsers)
|
||||
#stats http-request auth unless authorized
|
||||
timeout connect 5000ms
|
||||
timeout client 50000ms
|
||||
timeout server 50000ms
|
||||
|
||||
userlist AuthUsers
|
||||
user admin password $6$grgQMVfwI0XSGAQl$2usaQC9LVXXXYHtSkGUf74CIGsiH8fi/K.V6DuKSq0twPkmFGP2vL/b//Ulp2I4xBEZ3eYDhUbwBPK8jpmsbo.
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
version: '3.7'
|
||||
services:
|
||||
isard-apps-haproxy:
|
||||
build:
|
||||
context: ${BUILD_ROOT_PATH}/docker/haproxy
|
||||
dockerfile: Dockerfile
|
||||
target: production
|
||||
container_name: isard-apps-haproxy
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- ${DATA_FOLDER}/haproxy/certs:/certs:rw
|
||||
networks:
|
||||
- isard_net
|
||||
ports:
|
||||
- published: 80
|
||||
target: 80
|
||||
- published: 443
|
||||
target: 443
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
trap exit TERM
|
||||
while :
|
||||
do
|
||||
sleep 12h
|
||||
certbot renew --http-01-port 8888
|
||||
done
|
|
@ -0,0 +1,15 @@
|
|||
RENEW=0
|
||||
if [[ ! -f /certs/chain.pem && ! -z "$LETSENCRYPT_EMAIL" && ! -z "$LETSENCRYPT_DNS" ]]; then
|
||||
/usr/bin/certbot certonly --standalone -d "$LETSENCRYPT_DNS" -m "$LETSENCRYPT_EMAIL" -n --agree-tos
|
||||
if [[ $? == 0 ]] ; then
|
||||
cat /etc/letsencrypt/live/$LETSENCRYPT_DNS/fullchain.pem /etc/letsencrypt/live/$LETSENCRYPT_DNS/privkey.pem > /certs/chain.pem
|
||||
chmod 440 /certs/chain.pem
|
||||
mkdir -p /certs/letsencrypt/$LETSENCRYPT_DNS
|
||||
cp /etc/letsencrypt/live/$LETSENCRYPT_DNS/* /certs/letsencrypt/$LETSENCRYPT_DNS/
|
||||
RENEW=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $RENEW == 1 ]; then
|
||||
/bin/sh -c '/letsencrypt-check.sh' &
|
||||
fi
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Set debug path password
|
||||
PASSWD=$(python3 -c 'import os,crypt,getpass; print(crypt.crypt(os.environ["WEBAPP_ADMIN_PWD"], crypt.mksalt(crypt.METHOD_SHA512)))')
|
||||
sed -i "/^ user admin password/c\ user admin password $ADMIN_PWD" /usr/local/etc/haproxy/haproxy.cfg
|
||||
|
||||
#LETSENCRYPT_DOMAIN="$WEBAPP_LETSENCRYPT_DNS" LETSENCRYPT_EMAIL="$WEBAPP_LETSENCRYPT_EMAIL"
|
||||
letsencrypt.sh
|
|
@ -0,0 +1,258 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
# Frontend
|
||||
jitsi:
|
||||
container_name: jitsi
|
||||
image: jitsi/web:latest
|
||||
restart: ${RESTART_POLICY}
|
||||
# ports:
|
||||
# - '${HTTP_PORT}:80'
|
||||
# - '${HTTPS_PORT}:443'
|
||||
volumes:
|
||||
- ${CONFIG}/web:/config:Z
|
||||
- ${CONFIG}/transcripts:/usr/share/jitsi-meet/transcripts:Z
|
||||
environment:
|
||||
- ENABLE_LETSENCRYPT
|
||||
- ENABLE_HTTP_REDIRECT
|
||||
- ENABLE_HSTS
|
||||
- ENABLE_XMPP_WEBSOCKET
|
||||
- DISABLE_HTTPS
|
||||
- LETSENCRYPT_DOMAIN
|
||||
- LETSENCRYPT_EMAIL
|
||||
- LETSENCRYPT_USE_STAGING
|
||||
- PUBLIC_URL
|
||||
- TZ
|
||||
- AMPLITUDE_ID
|
||||
- ANALYTICS_SCRIPT_URLS
|
||||
- ANALYTICS_WHITELISTED_EVENTS
|
||||
- BRIDGE_CHANNEL
|
||||
- CALLSTATS_CUSTOM_SCRIPT_URL
|
||||
- CALLSTATS_ID
|
||||
- CALLSTATS_SECRET
|
||||
- CHROME_EXTENSION_BANNER_JSON
|
||||
- CONFCODE_URL
|
||||
- CONFIG_EXTERNAL_CONNECT
|
||||
- DEPLOYMENTINFO_ENVIRONMENT
|
||||
- DEPLOYMENTINFO_ENVIRONMENT_TYPE
|
||||
- DEPLOYMENTINFO_USERREGION
|
||||
- DIALIN_NUMBERS_URL
|
||||
- DIALOUT_AUTH_URL
|
||||
- DIALOUT_CODES_URL
|
||||
- DROPBOX_APPKEY
|
||||
- DROPBOX_REDIRECT_URI
|
||||
- DYNAMIC_BRANDING_URL
|
||||
- ENABLE_AUDIO_PROCESSING
|
||||
- ENABLE_AUTH
|
||||
- ENABLE_CALENDAR
|
||||
- ENABLE_FILE_RECORDING_SERVICE
|
||||
- ENABLE_FILE_RECORDING_SERVICE_SHARING
|
||||
- ENABLE_GUESTS
|
||||
- ENABLE_IPV6
|
||||
- ENABLE_LIPSYNC
|
||||
- ENABLE_NO_AUDIO_DETECTION
|
||||
- ENABLE_P2P
|
||||
- ENABLE_PREJOIN_PAGE
|
||||
- ENABLE_WELCOME_PAGE
|
||||
- ENABLE_CLOSE_PAGE
|
||||
- ENABLE_RECORDING
|
||||
- ENABLE_REMB
|
||||
- ENABLE_REQUIRE_DISPLAY_NAME
|
||||
- ENABLE_SIMULCAST
|
||||
- ENABLE_STATS_ID
|
||||
- ENABLE_STEREO
|
||||
- ENABLE_SUBDOMAINS
|
||||
- ENABLE_TALK_WHILE_MUTED
|
||||
- ENABLE_TCC
|
||||
- ENABLE_TRANSCRIPTIONS
|
||||
- ETHERPAD_PUBLIC_URL
|
||||
- ETHERPAD_URL_BASE
|
||||
- GOOGLE_ANALYTICS_ID
|
||||
- GOOGLE_API_APP_CLIENT_ID
|
||||
- INVITE_SERVICE_URL
|
||||
- JICOFO_AUTH_USER
|
||||
- MATOMO_ENDPOINT
|
||||
- MATOMO_SITE_ID
|
||||
- MICROSOFT_API_APP_CLIENT_ID
|
||||
- NGINX_RESOLVER
|
||||
- NGINX_WORKER_PROCESSES
|
||||
- NGINX_WORKER_CONNECTIONS
|
||||
- PEOPLE_SEARCH_URL
|
||||
- RESOLUTION
|
||||
- RESOLUTION_MIN
|
||||
- RESOLUTION_WIDTH
|
||||
- RESOLUTION_WIDTH_MIN
|
||||
- START_AUDIO_ONLY
|
||||
- START_AUDIO_MUTED
|
||||
- DISABLE_AUDIO_LEVELS
|
||||
- ENABLE_NOISY_MIC_DETECTION
|
||||
- START_BITRATE
|
||||
- DESKTOP_SHARING_FRAMERATE_MIN
|
||||
- DESKTOP_SHARING_FRAMERATE_MAX
|
||||
- START_VIDEO_MUTED
|
||||
- TESTING_CAP_SCREENSHARE_BITRATE
|
||||
- TESTING_OCTO_PROBABILITY
|
||||
- XMPP_AUTH_DOMAIN
|
||||
- XMPP_BOSH_URL_BASE
|
||||
- XMPP_DOMAIN
|
||||
- XMPP_GUEST_DOMAIN
|
||||
- XMPP_MUC_DOMAIN
|
||||
- XMPP_RECORDER_DOMAIN
|
||||
- TOKEN_AUTH_URL
|
||||
networks:
|
||||
isard_net:
|
||||
aliases:
|
||||
- ${XMPP_DOMAIN}
|
||||
|
||||
# XMPP server
|
||||
prosody:
|
||||
image: jitsi/prosody:latest
|
||||
restart: ${RESTART_POLICY}
|
||||
expose:
|
||||
- '5222'
|
||||
- '5347'
|
||||
- '5280'
|
||||
volumes:
|
||||
- ${CONFIG}/prosody/config:/config:Z
|
||||
- ${CONFIG}/prosody/prosody-plugins-custom:/prosody-plugins-custom:Z
|
||||
environment:
|
||||
- AUTH_TYPE
|
||||
- ENABLE_AUTH
|
||||
- ENABLE_GUESTS
|
||||
- ENABLE_LOBBY
|
||||
- ENABLE_XMPP_WEBSOCKET
|
||||
- GLOBAL_MODULES
|
||||
- GLOBAL_CONFIG
|
||||
- LDAP_URL
|
||||
- LDAP_BASE
|
||||
- LDAP_BINDDN
|
||||
- LDAP_BINDPW
|
||||
- LDAP_FILTER
|
||||
- LDAP_AUTH_METHOD
|
||||
- LDAP_VERSION
|
||||
- LDAP_USE_TLS
|
||||
- LDAP_TLS_CIPHERS
|
||||
- LDAP_TLS_CHECK_PEER
|
||||
- LDAP_TLS_CACERT_FILE
|
||||
- LDAP_TLS_CACERT_DIR
|
||||
- LDAP_START_TLS
|
||||
- XMPP_DOMAIN
|
||||
- XMPP_AUTH_DOMAIN
|
||||
- XMPP_GUEST_DOMAIN
|
||||
- XMPP_MUC_DOMAIN
|
||||
- XMPP_INTERNAL_MUC_DOMAIN
|
||||
- XMPP_MODULES
|
||||
- XMPP_MUC_MODULES
|
||||
- XMPP_INTERNAL_MUC_MODULES
|
||||
- XMPP_RECORDER_DOMAIN
|
||||
- XMPP_CROSS_DOMAIN
|
||||
- JICOFO_COMPONENT_SECRET
|
||||
- JICOFO_AUTH_USER
|
||||
- JICOFO_AUTH_PASSWORD
|
||||
- JVB_AUTH_USER
|
||||
- JVB_AUTH_PASSWORD
|
||||
- JIGASI_XMPP_USER
|
||||
- JIGASI_XMPP_PASSWORD
|
||||
- JIBRI_XMPP_USER
|
||||
- JIBRI_XMPP_PASSWORD
|
||||
- JIBRI_RECORDER_USER
|
||||
- JIBRI_RECORDER_PASSWORD
|
||||
- JWT_APP_ID
|
||||
- JWT_APP_SECRET
|
||||
- JWT_ACCEPTED_ISSUERS
|
||||
- JWT_ACCEPTED_AUDIENCES
|
||||
- JWT_ASAP_KEYSERVER
|
||||
- JWT_ALLOW_EMPTY
|
||||
- JWT_AUTH_TYPE
|
||||
- JWT_TOKEN_AUTH_MODULE
|
||||
- LOG_LEVEL
|
||||
- PUBLIC_URL
|
||||
- TZ
|
||||
networks:
|
||||
isard_net:
|
||||
aliases:
|
||||
- ${XMPP_SERVER}
|
||||
|
||||
# Focus component
|
||||
jicofo:
|
||||
image: jitsi/jicofo:latest
|
||||
restart: ${RESTART_POLICY}
|
||||
volumes:
|
||||
- ${CONFIG}/jicofo:/config:Z
|
||||
environment:
|
||||
- AUTH_TYPE
|
||||
- BRIDGE_AVG_PARTICIPANT_STRESS
|
||||
- BRIDGE_STRESS_THRESHOLD
|
||||
- ENABLE_AUTH
|
||||
- ENABLE_AUTO_OWNER
|
||||
- ENABLE_CODEC_VP8
|
||||
- ENABLE_CODEC_VP9
|
||||
- ENABLE_CODEC_H264
|
||||
- ENABLE_RECORDING
|
||||
- ENABLE_SCTP
|
||||
- JICOFO_COMPONENT_SECRET
|
||||
- JICOFO_AUTH_USER
|
||||
- JICOFO_AUTH_PASSWORD
|
||||
- JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS
|
||||
- JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT
|
||||
- JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT
|
||||
- JICOFO_ENABLE_HEALTH_CHECKS
|
||||
- JICOFO_SHORT_ID
|
||||
- JICOFO_RESERVATION_ENABLED
|
||||
- JICOFO_RESERVATION_REST_BASE_URL
|
||||
- JIBRI_BREWERY_MUC
|
||||
- JIBRI_REQUEST_RETRIES
|
||||
- JIBRI_PENDING_TIMEOUT
|
||||
- JIGASI_BREWERY_MUC
|
||||
- JIGASI_SIP_URI
|
||||
- JVB_BREWERY_MUC
|
||||
- MAX_BRIDGE_PARTICIPANTS
|
||||
- OCTO_BRIDGE_SELECTION_STRATEGY
|
||||
- TZ
|
||||
- XMPP_DOMAIN
|
||||
- XMPP_AUTH_DOMAIN
|
||||
- XMPP_INTERNAL_MUC_DOMAIN
|
||||
- XMPP_MUC_DOMAIN
|
||||
- XMPP_SERVER
|
||||
depends_on:
|
||||
- prosody
|
||||
networks:
|
||||
isard_net:
|
||||
|
||||
# Video bridge
|
||||
jvb:
|
||||
image: jitsi/jvb:latest
|
||||
restart: ${RESTART_POLICY}
|
||||
ports:
|
||||
- '${JVB_PORT}:${JVB_PORT}/udp'
|
||||
- '${JVB_TCP_PORT}:${JVB_TCP_PORT}'
|
||||
volumes:
|
||||
- ${CONFIG}/jvb:/config:Z
|
||||
environment:
|
||||
- DOCKER_HOST_ADDRESS
|
||||
- XMPP_AUTH_DOMAIN
|
||||
- XMPP_INTERNAL_MUC_DOMAIN
|
||||
- XMPP_SERVER
|
||||
- JVB_AUTH_USER
|
||||
- JVB_AUTH_PASSWORD
|
||||
- JVB_BREWERY_MUC
|
||||
- JVB_PORT
|
||||
- JVB_TCP_HARVESTER_DISABLED
|
||||
- JVB_TCP_PORT
|
||||
- JVB_TCP_MAPPED_PORT
|
||||
- JVB_STUN_SERVERS
|
||||
- JVB_ENABLE_APIS
|
||||
- JVB_WS_DOMAIN
|
||||
- JVB_WS_SERVER_ID
|
||||
- PUBLIC_URL
|
||||
- TZ
|
||||
depends_on:
|
||||
- prosody
|
||||
networks:
|
||||
isard_net:
|
||||
aliases:
|
||||
- jvb.meet.jitsi
|
||||
|
||||
networks:
|
||||
isard_net:
|
||||
name: isard_net
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 1fa5048510059323678a25c5e52f4c7bad3b5099
|
|
@ -0,0 +1,4 @@
|
|||
CREATE DATABASE wordpress;
|
||||
CREATE USER wordpress@localhost IDENTIFIED BY 'W0rdpr3ss';
|
||||
GRANT ALL PRIVILEGES ON wordpress.* TO wordpress@localhost;
|
||||
FLUSH PRIVILEGES;
|
|
@ -0,0 +1,23 @@
|
|||
version: '3.7'
|
||||
services:
|
||||
isard-apps-mariadb:
|
||||
image: mariadb:latest
|
||||
container_name: isard-apps-mariadb
|
||||
# ports:
|
||||
# - ${IP}:3306:3306 # change ip if required
|
||||
command: [
|
||||
'--default_authentication_plugin=mysql_native_password',
|
||||
'--character-set-server=utf8mb4',
|
||||
'--collation-server=utf8mb4_unicode_ci'
|
||||
]
|
||||
volumes:
|
||||
#- ${BUILD_ROOT_PATH}/docker/mariadb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
|
||||
- ${DATA_FOLDER}/mariadb:/var/lib/mysql
|
||||
environment:
|
||||
#MYSQL_DATABASE: wordpress
|
||||
MYSQL_ROOT_PASSWORD: ${MARIADB_PASSWORD}
|
||||
MYSQL_DATABASE: wordpress
|
||||
MYSQL_USER: wordpress
|
||||
MYSQL_PASSWORD: W0rdpr3ss
|
||||
networks:
|
||||
- isard_net
|
|
@ -0,0 +1,145 @@
|
|||
FROM php:7-fpm-alpine
|
||||
|
||||
RUN docker-php-source extract && \
|
||||
apk --no-cache add \
|
||||
php7 \
|
||||
php7-fpm \
|
||||
php7-opcache \
|
||||
php7-pecl-apcu \
|
||||
php7-mysqli \
|
||||
php7-pgsql \
|
||||
php7-json \
|
||||
php7-openssl \
|
||||
php7-curl \
|
||||
php7-zlib \
|
||||
php7-soap \
|
||||
php7-xml \
|
||||
php7-fileinfo \
|
||||
php7-phar \
|
||||
php7-intl \
|
||||
php7-dom \
|
||||
php7-xmlreader \
|
||||
php7-ctype \
|
||||
php7-session \
|
||||
php7-iconv \
|
||||
php7-tokenizer \
|
||||
php7-xmlrpc \
|
||||
php7-zip \
|
||||
php7-simplexml \
|
||||
php7-mbstring \
|
||||
php7-gd \
|
||||
nginx \
|
||||
runit \
|
||||
curl \
|
||||
# php7-pdo \
|
||||
# php7-pdo_pgsql \
|
||||
# php7-pdo_mysql \
|
||||
# php7-pdo_sqlite \
|
||||
# php7-bz2 \
|
||||
&& docker-php-source delete
|
||||
|
||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||
|
||||
|
||||
# Add application
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Expose the port nginx is reachable on
|
||||
EXPOSE 8080
|
||||
|
||||
# Let runit start nginx & php-fpm
|
||||
CMD [ "/bin/docker-entrypoint.sh" ]
|
||||
|
||||
# Configure a healthcheck to validate that everything is up&running
|
||||
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping
|
||||
|
||||
ENV client_max_body_size=2M \
|
||||
clear_env=no \
|
||||
allow_url_fopen=On \
|
||||
allow_url_include=Off \
|
||||
display_errors=Off \
|
||||
file_uploads=On \
|
||||
max_execution_time=0 \
|
||||
max_input_time=-1 \
|
||||
max_input_vars=1000 \
|
||||
memory_limit=128M \
|
||||
post_max_size=8M \
|
||||
upload_max_filesize=2M \
|
||||
zlib.output_compression=On
|
||||
|
||||
ARG ARCH=
|
||||
#FROM ${ARCH}erseco/alpine-php7-webserver AS base
|
||||
FROM base-php7
|
||||
LABEL maintainer="Ernesto Serrano <info@ernesto.es>"
|
||||
|
||||
#USER root
|
||||
COPY rootfs /
|
||||
#COPY 02-configure-moodle.sh docker-entrypoint-init.d/02-configure-moodle.sh
|
||||
#COPY --chown=nobody rootfs/ /
|
||||
|
||||
# crond needs root, so install dcron and cap package and set the capabilities
|
||||
# on dcron binary https://github.com/inter169/systs/blob/master/alpine/crond/README.md
|
||||
RUN apk add --no-cache dcron libcap && \
|
||||
# chown nobody:nobody /usr/sbin/crond && \
|
||||
setcap cap_setgid=ep /usr/sbin/crond
|
||||
|
||||
#USER nobody
|
||||
|
||||
# Change MOODLE_38_STABLE for new versions
|
||||
ENV MOODLE_URL=https://github.com/moodle/moodle/archive/MOODLE_310_STABLE.tar.gz \
|
||||
LANG=en_US.UTF-8 \
|
||||
LANGUAGE=en_US:en \
|
||||
SITE_URL=http://localhost \
|
||||
DB_TYPE=pgsql \
|
||||
DB_HOST=postgres \
|
||||
DB_PORT=5432 \
|
||||
DB_NAME=moodle \
|
||||
DB_USER=moodle \
|
||||
DB_PASS=moodle \
|
||||
DB_PREFIX=mdl_ \
|
||||
SSLPROXY=false \
|
||||
MOODLE_EMAIL=user@example.com \
|
||||
MOODLE_LANGUAGE=en \
|
||||
MOODLE_SITENAME=New-Site \
|
||||
MOODLE_USERNAME=moodleuser \
|
||||
MOODLE_PASSWORD=PLEASE_CHANGEME \
|
||||
SMTP_HOST=smtp.gmail.com \
|
||||
SMTP_PORT=587 \
|
||||
SMTP_USER=your_email@gmail.com \
|
||||
SMTP_PASSWORD=your_password \
|
||||
SMTP_PROTOCOL=tls \
|
||||
MOODLE_MAIL_NOREPLY_ADDRESS=noreply@localhost \
|
||||
MOODLE_MAIL_PREFIX=[moodle] \
|
||||
client_max_body_size=50M \
|
||||
post_max_size=50M \
|
||||
upload_max_filesize=50M \
|
||||
max_input_vars=1000
|
||||
|
||||
#USER nobody
|
||||
|
||||
#RUN curl --location $MOODLE_URL | tar xz --strip-components=1 -C /var/www/html/
|
||||
|
||||
#FROM erseco/alpine-moodle
|
||||
|
||||
|
||||
#FROM base
|
||||
#USER root
|
||||
#RUN chmod a+rwx -R /var/www/html
|
||||
#USER nobody
|
||||
|
||||
#RUN curl --location https://moodle.org/plugins/download.php/23298/auth_oidc_moodle310_2020110900.zip > auth_oidc.zip
|
||||
#RUN unzip auth_oidc.zip -d /var/www/html/auth/
|
||||
#RUN rm auth_oidc.zip
|
||||
|
||||
#RUN curl --location https://moodle.org/plugins/download.php/23360/mod_jitsi_moodle310_2021020300.zip > jitsi.zip
|
||||
#RUN unzip jitsi.zip -d /var/www/html/mod/
|
||||
#RUN rm jitsi.zip
|
||||
|
||||
#RUN curl --location https://moodle.org/plugins/download.php/23294/mod_bigbluebuttonbn_moodle310_2019101004.zip > bbb.zip
|
||||
#RUN unzip bbb.zip -d /var/www/html/mod/
|
||||
#RUN rm bbb.zip
|
||||
|
||||
#ADD plugins/auth_saml2.zip /var/www/html/
|
||||
#RUN curl --location https://moodle.org/plugins/download.php/20505/auth_saml2_moodle37_2019110701.zip > auth_saml2.zip
|
||||
#RUN unzip auth_saml2.zip -d /var/www/html/auth/
|
||||
#RUN rm auth_saml2.zip
|
|
@ -0,0 +1,143 @@
|
|||
ARG ARCH=
|
||||
FROM ${ARCH}alpine:3.13 as php-fpm
|
||||
|
||||
LABEL Maintainer="Ernesto Serrano <info@ernesto.es>" \
|
||||
Description="Lightweight container with Nginx & PHP-FPM based on Alpine Linux."
|
||||
|
||||
# Install packages
|
||||
RUN apk --no-cache add \
|
||||
php7 \
|
||||
php7-fpm \
|
||||
php7-opcache \
|
||||
php7-pecl-apcu \
|
||||
php7-mysqli \
|
||||
php7-pgsql \
|
||||
php7-json \
|
||||
php7-openssl \
|
||||
php7-curl \
|
||||
php7-zlib \
|
||||
php7-soap \
|
||||
php7-xml \
|
||||
php7-fileinfo \
|
||||
php7-phar \
|
||||
php7-intl \
|
||||
php7-dom \
|
||||
php7-xmlreader \
|
||||
php7-ctype \
|
||||
php7-session \
|
||||
php7-iconv \
|
||||
php7-tokenizer \
|
||||
php7-xmlrpc \
|
||||
php7-zip \
|
||||
php7-simplexml \
|
||||
php7-mbstring \
|
||||
php7-gd \
|
||||
nginx \
|
||||
runit \
|
||||
curl \
|
||||
# php7-pdo \
|
||||
# php7-pdo_pgsql \
|
||||
# php7-pdo_mysql \
|
||||
# php7-pdo_sqlite \
|
||||
# php7-bz2 \
|
||||
# Bring in gettext so we can get `envsubst`, then throw
|
||||
# the rest away. To do this, we need to install `gettext`
|
||||
# then move `envsubst` out of the way so `gettext` can
|
||||
# be deleted completely, then move `envsubst` back.
|
||||
&& apk add --no-cache --virtual .gettext gettext \
|
||||
&& mv /usr/bin/envsubst /tmp/ \
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner /tmp/envsubst \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| sort -u \
|
||||
| xargs -r apk info --installed \
|
||||
| sort -u \
|
||||
)" \
|
||||
&& apk add --no-cache $runDeps \
|
||||
&& apk del .gettext \
|
||||
&& mv /tmp/envsubst /usr/local/bin/ \
|
||||
# Remove alpine cache
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
# Remove default server definition
|
||||
&& rm /etc/nginx/conf.d/default.conf
|
||||
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
|
||||
# && chown -R nobody.nobody /run \
|
||||
# && chown -R nobody.nobody /var/lib/nginx \
|
||||
# && chown -R nobody.nobody /var/log/nginx
|
||||
|
||||
# Add configuration files
|
||||
#COPY --chown=nobody rootfs/ /
|
||||
COPY rootfs-php7/rootfs/ /
|
||||
|
||||
# Switch to use a non-root user from here on
|
||||
#USER nobody
|
||||
|
||||
# Add application
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Expose the port nginx is reachable on
|
||||
EXPOSE 8080
|
||||
|
||||
# Let runit start nginx & php-fpm
|
||||
CMD [ "/bin/docker-entrypoint.sh" ]
|
||||
|
||||
# Configure a healthcheck to validate that everything is up&running
|
||||
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping
|
||||
|
||||
ENV client_max_body_size=2M \
|
||||
clear_env=no \
|
||||
allow_url_fopen=On \
|
||||
allow_url_include=Off \
|
||||
display_errors=Off \
|
||||
file_uploads=On \
|
||||
max_execution_time=0 \
|
||||
max_input_time=-1 \
|
||||
max_input_vars=1000 \
|
||||
memory_limit=128M \
|
||||
post_max_size=8M \
|
||||
upload_max_filesize=2M \
|
||||
zlib.output_compression=On
|
||||
|
||||
|
||||
FROM php-fpm as moodle
|
||||
COPY rootfs/ /
|
||||
|
||||
# crond needs root, so install dcron and cap package and set the capabilities
|
||||
# on dcron binary https://github.com/inter169/systs/blob/master/alpine/crond/README.md
|
||||
RUN apk add --no-cache dcron libcap && \
|
||||
chown nobody:nobody /usr/sbin/crond && \
|
||||
setcap cap_setgid=ep /usr/sbin/crond
|
||||
|
||||
# Change MOODLE_38_STABLE for new versions
|
||||
ENV MOODLE_URL=https://github.com/moodle/moodle/archive/MOODLE_310_STABLE.tar.gz \
|
||||
LANG=en_US.UTF-8 \
|
||||
LANGUAGE=en_US:en \
|
||||
SITE_URL=http://localhost \
|
||||
DB_TYPE=pgsql \
|
||||
DB_HOST=postgres \
|
||||
DB_PORT=5432 \
|
||||
DB_NAME=moodle \
|
||||
DB_USER=moodle \
|
||||
DB_PASS=moodle \
|
||||
DB_PREFIX=mdl_ \
|
||||
SSLPROXY=false \
|
||||
MOODLE_EMAIL=user@example.com \
|
||||
MOODLE_LANGUAGE=en \
|
||||
MOODLE_SITENAME=New-Site \
|
||||
MOODLE_USERNAME=moodleuser \
|
||||
MOODLE_PASSWORD=PLEASE_CHANGEME \
|
||||
SMTP_HOST=smtp.gmail.com \
|
||||
SMTP_PORT=587 \
|
||||
SMTP_USER=your_email@gmail.com \
|
||||
SMTP_PASSWORD=your_password \
|
||||
SMTP_PROTOCOL=tls \
|
||||
MOODLE_MAIL_NOREPLY_ADDRESS=noreply@localhost \
|
||||
MOODLE_MAIL_PREFIX=[moodle] \
|
||||
client_max_body_size=50M \
|
||||
post_max_size=50M \
|
||||
upload_max_filesize=50M \
|
||||
max_input_vars=1000
|
||||
|
||||
FROM moodle as production
|
||||
|
||||
COPY plugins.sh /
|
|
@ -0,0 +1,175 @@
|
|||
ARG ARCH=
|
||||
FROM ${ARCH}alpine:3.13 as base-php7
|
||||
|
||||
LABEL Maintainer="Ernesto Serrano <info@ernesto.es>" \
|
||||
Description="Lightweight container with Nginx & PHP-FPM based on Alpine Linux."
|
||||
|
||||
# Install packages
|
||||
RUN apk --no-cache add \
|
||||
php7 \
|
||||
php7-fpm \
|
||||
php7-opcache \
|
||||
php7-pecl-apcu \
|
||||
php7-mysqli \
|
||||
php7-pgsql \
|
||||
php7-json \
|
||||
php7-openssl \
|
||||
php7-curl \
|
||||
php7-zlib \
|
||||
php7-soap \
|
||||
php7-xml \
|
||||
php7-fileinfo \
|
||||
php7-phar \
|
||||
php7-intl \
|
||||
php7-dom \
|
||||
php7-xmlreader \
|
||||
php7-ctype \
|
||||
php7-session \
|
||||
php7-iconv \
|
||||
php7-tokenizer \
|
||||
php7-xmlrpc \
|
||||
php7-zip \
|
||||
php7-simplexml \
|
||||
php7-mbstring \
|
||||
php7-gd \
|
||||
nginx \
|
||||
runit \
|
||||
curl \
|
||||
# php7-pdo \
|
||||
# php7-pdo_pgsql \
|
||||
# php7-pdo_mysql \
|
||||
# php7-pdo_sqlite \
|
||||
# php7-bz2 \
|
||||
# Bring in gettext so we can get `envsubst`, then throw
|
||||
# the rest away. To do this, we need to install `gettext`
|
||||
# then move `envsubst` out of the way so `gettext` can
|
||||
# be deleted completely, then move `envsubst` back.
|
||||
&& apk add --no-cache --virtual .gettext gettext \
|
||||
&& mv /usr/bin/envsubst /tmp/ \
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner /tmp/envsubst \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| sort -u \
|
||||
| xargs -r apk info --installed \
|
||||
| sort -u \
|
||||
)" \
|
||||
&& apk add --no-cache $runDeps \
|
||||
&& apk del .gettext \
|
||||
&& mv /tmp/envsubst /usr/local/bin/ \
|
||||
# Remove alpine cache
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
# Remove default server definition
|
||||
&& rm /etc/nginx/conf.d/default.conf
|
||||
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
|
||||
# && chown -R nobody.nobody /run \
|
||||
# && chown -R nobody.nobody /var/lib/nginx \
|
||||
# && chown -R nobody.nobody /var/log/nginx
|
||||
|
||||
# Add configuration files
|
||||
#COPY --chown=nobody rootfs/ /
|
||||
COPY rootfs-php7/rootfs/ /
|
||||
# Switch to use a non-root user from here on
|
||||
#USER nobody
|
||||
|
||||
# Add application
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Expose the port nginx is reachable on
|
||||
EXPOSE 8080
|
||||
|
||||
# Let runit start nginx & php-fpm
|
||||
CMD [ "/bin/docker-entrypoint.sh" ]
|
||||
|
||||
# Configure a healthcheck to validate that everything is up&running
|
||||
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping
|
||||
|
||||
ENV client_max_body_size=2M \
|
||||
clear_env=no \
|
||||
allow_url_fopen=On \
|
||||
allow_url_include=Off \
|
||||
display_errors=Off \
|
||||
file_uploads=On \
|
||||
max_execution_time=0 \
|
||||
max_input_time=-1 \
|
||||
max_input_vars=1000 \
|
||||
memory_limit=128M \
|
||||
post_max_size=8M \
|
||||
upload_max_filesize=2M \
|
||||
zlib.output_compression=On
|
||||
|
||||
ARG ARCH=
|
||||
#FROM ${ARCH}erseco/alpine-php7-webserver AS base
|
||||
FROM base-php7
|
||||
LABEL maintainer="Ernesto Serrano <info@ernesto.es>"
|
||||
|
||||
#USER root
|
||||
COPY rootfs /
|
||||
#COPY 02-configure-moodle.sh docker-entrypoint-init.d/02-configure-moodle.sh
|
||||
#COPY --chown=nobody rootfs/ /
|
||||
|
||||
# crond needs root, so install dcron and cap package and set the capabilities
|
||||
# on dcron binary https://github.com/inter169/systs/blob/master/alpine/crond/README.md
|
||||
RUN apk add --no-cache dcron libcap && \
|
||||
# chown nobody:nobody /usr/sbin/crond && \
|
||||
setcap cap_setgid=ep /usr/sbin/crond
|
||||
|
||||
#USER nobody
|
||||
|
||||
# Change MOODLE_38_STABLE for new versions
|
||||
ENV MOODLE_URL=https://github.com/moodle/moodle/archive/MOODLE_310_STABLE.tar.gz \
|
||||
LANG=en_US.UTF-8 \
|
||||
LANGUAGE=en_US:en \
|
||||
SITE_URL=http://localhost \
|
||||
DB_TYPE=pgsql \
|
||||
DB_HOST=postgres \
|
||||
DB_PORT=5432 \
|
||||
DB_NAME=moodle \
|
||||
DB_USER=moodle \
|
||||
DB_PASS=moodle \
|
||||
DB_PREFIX=mdl_ \
|
||||
SSLPROXY=false \
|
||||
MOODLE_EMAIL=user@example.com \
|
||||
MOODLE_LANGUAGE=en \
|
||||
MOODLE_SITENAME=New-Site \
|
||||
MOODLE_USERNAME=moodleuser \
|
||||
MOODLE_PASSWORD=PLEASE_CHANGEME \
|
||||
SMTP_HOST=smtp.gmail.com \
|
||||
SMTP_PORT=587 \
|
||||
SMTP_USER=your_email@gmail.com \
|
||||
SMTP_PASSWORD=your_password \
|
||||
SMTP_PROTOCOL=tls \
|
||||
MOODLE_MAIL_NOREPLY_ADDRESS=noreply@localhost \
|
||||
MOODLE_MAIL_PREFIX=[moodle] \
|
||||
client_max_body_size=50M \
|
||||
post_max_size=50M \
|
||||
upload_max_filesize=50M \
|
||||
max_input_vars=1000
|
||||
|
||||
#USER nobody
|
||||
|
||||
#RUN curl --location $MOODLE_URL | tar xz --strip-components=1 -C /var/www/html/
|
||||
|
||||
#FROM erseco/alpine-moodle
|
||||
|
||||
|
||||
#FROM base
|
||||
#USER root
|
||||
#RUN chmod a+rwx -R /var/www/html
|
||||
#USER nobody
|
||||
|
||||
#RUN curl --location https://moodle.org/plugins/download.php/23298/auth_oidc_moodle310_2020110900.zip > auth_oidc.zip
|
||||
#RUN unzip auth_oidc.zip -d /var/www/html/auth/
|
||||
#RUN rm auth_oidc.zip
|
||||
|
||||
#RUN curl --location https://moodle.org/plugins/download.php/23360/mod_jitsi_moodle310_2021020300.zip > jitsi.zip
|
||||
#RUN unzip jitsi.zip -d /var/www/html/mod/
|
||||
#RUN rm jitsi.zip
|
||||
|
||||
#RUN curl --location https://moodle.org/plugins/download.php/23294/mod_bigbluebuttonbn_moodle310_2019101004.zip > bbb.zip
|
||||
#RUN unzip bbb.zip -d /var/www/html/mod/
|
||||
#RUN rm bbb.zip
|
||||
|
||||
#ADD plugins/auth_saml2.zip /var/www/html/
|
||||
#RUN curl --location https://moodle.org/plugins/download.php/20505/auth_saml2_moodle37_2019110701.zip > auth_saml2.zip
|
||||
#RUN unzip auth_saml2.zip -d /var/www/html/auth/
|
||||
#RUN rm auth_saml2.zip
|
|
@ -0,0 +1,33 @@
|
|||
FROM erseco/alpine-moodle
|
||||
|
||||
#USER root
|
||||
#RUN chown nobody:nobody /var/www/html
|
||||
#RUN chmod a+rwx -R /var/www/html
|
||||
#USER nobody
|
||||
# USER root
|
||||
# #RUN mkdir /var/www/html
|
||||
# RUN chown -R nobody:nobody /var/www/html
|
||||
# #RUN mkdir /var/www/moodledata
|
||||
# RUN chown -R nobody:nobody /var/www/moodledata
|
||||
# USER nobody
|
||||
# COPY rootfs/docker-entrypoint-init.d/02-configure-moodle.sh /docker-entrypoint-init.d/02-configure-moodle.sh
|
||||
# COPY rootfs/isinstalled.php /
|
||||
# COPY plugins.sh /
|
||||
# USER root
|
||||
RUN curl --location https://moodle.org/plugins/download.php/23298/auth_oidc_moodle310_2020110900.zip > auth_oidc.zip
|
||||
RUN unzip auth_oidc.zip -d /var/www/html/auth/
|
||||
RUN rm auth_oidc.zip
|
||||
|
||||
RUN curl --location https://moodle.org/plugins/download.php/23360/mod_jitsi_moodle310_2021020300.zip > jitsi.zip
|
||||
RUN unzip jitsi.zip -d /var/www/html/mod/
|
||||
RUN rm jitsi.zip
|
||||
|
||||
RUN curl --location https://moodle.org/plugins/download.php/23294/mod_bigbluebuttonbn_moodle310_2019101004.zip > bbb.zip
|
||||
RUN unzip bbb.zip -d /var/www/html/mod/
|
||||
RUN rm bbb.zip
|
||||
|
||||
#ADD plugins/auth_saml2.zip /var/www/html/
|
||||
RUN curl --location https://github.com/isard-vdi/moodle-auth_saml2/archive/refs/heads/role_map.zip > auth_saml2.zip
|
||||
RUN unzip auth_saml2.zip -d /var/www/html/auth/
|
||||
RUN mv /var/www/html/auth/moodle-auth_saml2-role_map /var/www/html/auth/saml2
|
||||
RUN rm auth_saml2.zip
|
|
@ -0,0 +1,5 @@
|
|||
# Moodle
|
||||
|
||||
- BigBlueButton: Auto-configure first time
|
||||
- Jitsi: Auto-configure first time
|
||||
- Saml2 Connect: Activate & auto-configure first time
|
|
@ -0,0 +1,46 @@
|
|||
version: '3.7'
|
||||
services:
|
||||
isard-apps-moodle:
|
||||
#image: erseco/alpine-moodle
|
||||
build:
|
||||
context: ${BUILD_ROOT_PATH}/docker/moodle
|
||||
dockerfile: Dockerfile.test
|
||||
container_name: isard-apps-moodle
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
#- ${DATA_FOLDER}/moodle:/var/www:rw
|
||||
#- ${DATA_FOLDER}/moodle/data:/var/www/moodledata:rw
|
||||
#- ${DATA_FOLDER}/moodle/html:/var/www/html:rw
|
||||
- moodledata:/var/www/moodledata
|
||||
depends_on:
|
||||
- isard-apps-postgresql
|
||||
environment:
|
||||
- LANG=${LANG}
|
||||
- LANGUAGE:${LANGUAGE}
|
||||
- SITE_URL=https://moodle.${DOMAIN}
|
||||
- DB_TYPE=pgsql
|
||||
- DB_HOST=isard-apps-postgresql
|
||||
- DB_PORT=5432
|
||||
- DB_NAME=moodle
|
||||
- DB_USER=${MOODLE_POSTGRES_USER}
|
||||
- DB_PASS=${MOODLE_POSTGRES_PASSWORD}
|
||||
- DB_PREFIX=mdl_
|
||||
- SSLPROXY=true
|
||||
- MOODLE_EMAIL=${MOODLE_EMAIL}
|
||||
- MOODLE_LANGUAGE=es
|
||||
- MOODLE_SITENAME=isard-office
|
||||
- MOODLE_USERNAME=${MOODLE_ADMIN_USER}
|
||||
- MOODLE_PASSWORD=${MOODLE_ADMIN_PASSWORD}
|
||||
- SMTP_HOST=${SMTP_HOST}
|
||||
- SMTP_PORT=${SMTP_PORT}
|
||||
- SMTP_USER=${SMTP_USER}
|
||||
- SMTP_PASSWORD=${SMTP_PASSWORD}
|
||||
- SMTP_PROTOCOL=${SMTP_PROTOCOL}
|
||||
- MOODLE_MAIL_NOREPLY_ADDRESS=${MOODLE_MAIL_NOREPLY_ADDRESS}
|
||||
- MOODLE_MAIL_PREFIX=${MOODLE_MAIL_PREFIX}
|
||||
networks:
|
||||
- isard_net
|
||||
|
||||
volumes:
|
||||
moodledata: null
|
|
@ -0,0 +1,12 @@
|
|||
git clone https://github.com/isard-vdi/moodle-auth_saml2.git /var/www/html/auth/saml2
|
||||
#curl --location https://moodle.org/plugins/download.php/23298/auth_oidc_moodle310_2020110900.zip > auth_oidc.zip
|
||||
#unzip auth_oidc.zip -d /var/www/html/auth/
|
||||
#rm auth_oidc.zip
|
||||
|
||||
curl --location https://moodle.org/plugins/download.php/23360/mod_jitsi_moodle310_2021020300.zip > jitsi.zip
|
||||
unzip jitsi.zip -d /var/www/html/mod/
|
||||
rm jitsi.zip
|
||||
|
||||
curl --location https://moodle.org/plugins/download.php/23294/mod_bigbluebuttonbn_moodle310_2019101004.zip > bbb.zip
|
||||
unzip bbb.zip -d /var/www/html/mod/
|
||||
rm bbb.zip
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
Subproject commit 3f1758d9e20f7a1d6c08530871b8e325d6cbd5b8
|
|
@ -0,0 +1,103 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Moodle configuration script
|
||||
#
|
||||
set -eo pipefail
|
||||
|
||||
# Check that the database is available
|
||||
echo "Waiting for $DB_HOST:$DB_PORT to be ready"
|
||||
while ! nc -w 1 $DB_HOST $DB_PORT; do
|
||||
# Show some progress
|
||||
echo -n '.';
|
||||
sleep 1;
|
||||
done
|
||||
echo "$database is ready"
|
||||
# Give it another 3 seconds.
|
||||
sleep 3;
|
||||
|
||||
|
||||
# Check if the config.php file exists
|
||||
if [ ! -f /var/www/html/config.php ]; then
|
||||
echo "Downloading moodle src..."
|
||||
curl --location $MOODLE_URL | tar xz --strip-components=1 -C /var/www/html/
|
||||
cp /isinstalled.php /var/www/html/admin/cli/
|
||||
sh /plugins.sh
|
||||
chown -R nobody:root /var/www/html
|
||||
|
||||
echo "Generating config.php file..."
|
||||
ENV_VAR='var' php -d max_input_vars=1000 /var/www/html/admin/cli/install.php \
|
||||
--lang=$MOODLE_LANGUAGE \
|
||||
--wwwroot=$SITE_URL \
|
||||
--dataroot=/var/www/moodledata/ \
|
||||
--dbtype=$DB_TYPE \
|
||||
--dbhost=$DB_HOST \
|
||||
--dbname=$DB_NAME \
|
||||
--dbuser=$DB_USER \
|
||||
--dbpass=$DB_PASS \
|
||||
--dbport=$DB_PORT \
|
||||
--prefix=$DB_PREFIX \
|
||||
--fullname=Dockerized_Moodle \
|
||||
--shortname=moodle \
|
||||
--adminuser=$MOODLE_USERNAME \
|
||||
--adminpass=$MOODLE_PASSWORD \
|
||||
--adminemail=$MOODLE_EMAIL \
|
||||
--non-interactive \
|
||||
--agree-license \
|
||||
--skip-database
|
||||
|
||||
if [ "$SSLPROXY" = 'true' ]; then
|
||||
sed -i '/require_once/i $CFG->sslproxy=true;' /var/www/html/config.php
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Check if the database is already installed
|
||||
if php -d max_input_vars=1000 /var/www/html/admin/cli/isinstalled.php ; then
|
||||
|
||||
echo "Installing database..."
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/install_database.php \
|
||||
--lang=$MOODLE_LANGUAGE \
|
||||
--adminuser=$MOODLE_USERNAME \
|
||||
--adminpass=$MOODLE_PASSWORD \
|
||||
--adminemail=$MOODLE_EMAIL \
|
||||
--fullname=Dockerized_Moodle \
|
||||
--shortname=moodle \
|
||||
--agree-license
|
||||
|
||||
echo "Configuring settings..."
|
||||
# php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=slasharguments --set=0
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=pathtophp --set=/usr/bin/php
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=pathtodu --set=/usr/bin/du
|
||||
# php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=aspellpath --set=/usr/bin/aspell
|
||||
# php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=pathtodot --set=/usr/bin/dot
|
||||
# php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=pathtogs --set=/usr/bin/gs
|
||||
# php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=pathtopython --set=/usr/bin/python3
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=enableblogs --set=0
|
||||
|
||||
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=smtphosts --set=$SMTP_HOST:$SMTP_PORT
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=smtpuser --set=$SMTP_USER
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=smtppass --set=$SMTP_PASSWORD
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=smtpsecure --set=$SMTP_PROTOCOL
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=noreplyaddress --set=$MOODLE_MAIL_NOREPLY_ADDRESS
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/cfg.php --name=emailsubjectprefix --set=$MOODLE_MAIL_PREFIX
|
||||
|
||||
else
|
||||
echo "Upgrading moodle..."
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/maintenance.php --enable
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/upgrade.php --non-interactive --allow-unstable
|
||||
php -d max_input_vars=1000 /var/www/html/admin/cli/maintenance.php --disable
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
* * * * * /usr/bin/php /var/www/html/admin/cli/cron.php > /dev/null
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
# pipe stderr to stdout and run cron
|
||||
exec 2>&1
|
||||
exec /usr/sbin/crond -f
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
define('CLI_SCRIPT', true);
|
||||
// extra execution prevention - we can not just require config.php here
|
||||
if (isset($_SERVER['REMOTE_ADDR'])) {
|
||||
exit(1);
|
||||
}
|
||||
// Nothing to do if config.php exists
|
||||
$configfile = __DIR__.'/../../config.php';
|
||||
require($configfile);
|
||||
if ($DB->get_tables() ) {
|
||||
// If tables exists, a previous instalation is found, so exit with error
|
||||
exit(2);
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US:en
|
||||
SITE_URL=http://localhost
|
||||
DB_TYPE=pgsql
|
||||
DB_HOST=postgres
|
||||
DB_PORT=5432
|
||||
DB_NAME=moodle
|
||||
DB_USER=moodle
|
||||
DB_PASS=moodle
|
||||
DB_PREFIX=mdl_
|
||||
SSLPROXY=false
|
||||
MOODLE_EMAIL=user@example.com
|
||||
MOODLE_LANGUAGE=en
|
||||
MOODLE_SITENAME=New-Site
|
||||
MOODLE_USERNAME=moodleuser
|
||||
MOODLE_PASSWORD=PLEASE_CHANGEME
|
||||
SMTP_HOST=smtp.gmail.com
|
||||
SMTP_PORT=587
|
||||
SMTP_USER=your_email@gmail.com
|
||||
SMTP_PASSWORD=your_password \
|
||||
SMTP_PROTOCOL=tls
|
||||
MOODLE_MAIL_NOREPLY_ADDRESS=noreply@localhost
|
||||
MOODLE_MAIL_PREFIX=[moodle]
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 53d1631d2fc355d9bd3d8e466ffd176e31de115c
|
|
@ -0,0 +1,4 @@
|
|||
version: '3.7'
|
||||
networks:
|
||||
isard_net:
|
||||
name: isard_net
|
|
@ -0,0 +1,51 @@
|
|||
FROM nextcloud:fpm-alpine
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
apk add --no-cache \
|
||||
ffmpeg \
|
||||
imagemagick \
|
||||
procps \
|
||||
samba-client \
|
||||
supervisor \
|
||||
# libreoffice \
|
||||
;
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
$PHPIZE_DEPS \
|
||||
imap-dev \
|
||||
krb5-dev \
|
||||
openssl-dev \
|
||||
samba-dev \
|
||||
bzip2-dev \
|
||||
; \
|
||||
\
|
||||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
|
||||
docker-php-ext-install \
|
||||
bz2 \
|
||||
imap \
|
||||
; \
|
||||
pecl install smbclient; \
|
||||
docker-php-ext-enable smbclient; \
|
||||
\
|
||||
runDeps="$( \
|
||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||
| tr ',' '\n' \
|
||||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)"; \
|
||||
apk add --virtual .nextcloud-phpext-rundeps $runDeps; \
|
||||
apk del .build-deps
|
||||
|
||||
RUN mkdir -p \
|
||||
/var/log/supervisord \
|
||||
/var/run/supervisord \
|
||||
;
|
||||
|
||||
COPY supervisord.conf /
|
||||
|
||||
ENV NEXTCLOUD_UPDATE=1
|
||||
|
||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
|
@ -0,0 +1 @@
|
|||
*~
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit14889e338c101f45bb4a1ad143015514::getLoader();
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "ownpad/3rdparty",
|
||||
"description": "3rdparty components for ownpad",
|
||||
"license": "MIT",
|
||||
"config": {
|
||||
"vendor-dir": ".",
|
||||
"optimize-autoloader": true,
|
||||
"classmap-authoritative": true
|
||||
},
|
||||
"require": {
|
||||
"tomnomnom/etherpad-lite-client": "^0.1.2"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "e64780f152a2832ab031c092c6f06e4c",
|
||||
"content-hash": "9fc763c2fb7f95634e8033a460de17c7",
|
||||
"packages": [
|
||||
{
|
||||
"name": "tomnomnom/etherpad-lite-client",
|
||||
"version": "0.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/TomNomNom/etherpad-lite-client.git",
|
||||
"reference": "932ac4903d7982038d5d04c03f8f9c809a5356bd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/TomNomNom/etherpad-lite-client/zipball/932ac4903d7982038d5d04c03f8f9c809a5356bd",
|
||||
"reference": "932ac4903d7982038d5d04c03f8f9c809a5356bd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"EtherpadLite\\": "EtherpadLite/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache"
|
||||
],
|
||||
"description": "Etherpad Lite client for PHP",
|
||||
"homepage": "https://github.com/TomNomNom/etherpad-lite-client/",
|
||||
"time": "2016-02-09 14:27:44"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,413 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
/**
|
||||
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
||||
*
|
||||
* $loader = new \Composer\Autoload\ClassLoader();
|
||||
*
|
||||
* // register classes with namespaces
|
||||
* $loader->add('Symfony\Component', __DIR__.'/component');
|
||||
* $loader->add('Symfony', __DIR__.'/framework');
|
||||
*
|
||||
* // activate the autoloader
|
||||
* $loader->register();
|
||||
*
|
||||
* // to enable searching the include path (eg. for PEAR packages)
|
||||
* $loader->setUseIncludePath(true);
|
||||
*
|
||||
* In this example, if you try to use a class in the Symfony\Component
|
||||
* namespace or one of its children (Symfony\Component\Console for instance),
|
||||
* the autoloader will first look for the class under the component/
|
||||
* directory, and it will then fallback to the framework/ directory if not
|
||||
* found before giving up.
|
||||
*
|
||||
* This class is loosely based on the Symfony UniversalClassLoader.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @see http://www.php-fig.org/psr/psr-0/
|
||||
* @see http://www.php-fig.org/psr/psr-4/
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
// PSR-4
|
||||
private $prefixLengthsPsr4 = array();
|
||||
private $prefixDirsPsr4 = array();
|
||||
private $fallbackDirsPsr4 = array();
|
||||
|
||||
// PSR-0
|
||||
private $prefixesPsr0 = array();
|
||||
private $fallbackDirsPsr0 = array();
|
||||
|
||||
private $useIncludePath = false;
|
||||
private $classMap = array();
|
||||
|
||||
private $classMapAuthoritative = false;
|
||||
|
||||
public function getPrefixes()
|
||||
{
|
||||
if (!empty($this->prefixesPsr0)) {
|
||||
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
public function getPrefixesPsr4()
|
||||
{
|
||||
return $this->prefixDirsPsr4;
|
||||
}
|
||||
|
||||
public function getFallbackDirs()
|
||||
{
|
||||
return $this->fallbackDirsPsr0;
|
||||
}
|
||||
|
||||
public function getFallbackDirsPsr4()
|
||||
{
|
||||
return $this->fallbackDirsPsr4;
|
||||
}
|
||||
|
||||
public function getClassMap()
|
||||
{
|
||||
return $this->classMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $classMap Class to filename map
|
||||
*/
|
||||
public function addClassMap(array $classMap)
|
||||
{
|
||||
if ($this->classMap) {
|
||||
$this->classMap = array_merge($this->classMap, $classMap);
|
||||
} else {
|
||||
$this->classMap = $classMap;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix, either
|
||||
* appending or prepending to the ones previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param array|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*/
|
||||
public function add($prefix, $paths, $prepend = false)
|
||||
{
|
||||
if (!$prefix) {
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
(array) $paths,
|
||||
$this->fallbackDirsPsr0
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
$this->fallbackDirsPsr0,
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$first = $prefix[0];
|
||||
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
||||
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
||||
|
||||
return;
|
||||
}
|
||||
if ($prepend) {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
$this->prefixesPsr0[$first][$prefix]
|
||||
);
|
||||
} else {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
$this->prefixesPsr0[$first][$prefix],
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace, either
|
||||
* appending or prepending to the ones previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param array|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function addPsr4($prefix, $paths, $prepend = false)
|
||||
{
|
||||
if (!$prefix) {
|
||||
// Register directories for the root namespace.
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
(array) $paths,
|
||||
$this->fallbackDirsPsr4
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
$this->fallbackDirsPsr4,
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||
// Register directories for a new namespace.
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
} elseif ($prepend) {
|
||||
// Prepend directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
$this->prefixDirsPsr4[$prefix]
|
||||
);
|
||||
} else {
|
||||
// Append directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
$this->prefixDirsPsr4[$prefix],
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix,
|
||||
* replacing any others previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param array|string $paths The PSR-0 base directories
|
||||
*/
|
||||
public function set($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr0 = (array) $paths;
|
||||
} else {
|
||||
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace,
|
||||
* replacing any others previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param array|string $paths The PSR-4 base directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function setPsr4($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr4 = (array) $paths;
|
||||
} else {
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns on searching the include path for class files.
|
||||
*
|
||||
* @param bool $useIncludePath
|
||||
*/
|
||||
public function setUseIncludePath($useIncludePath)
|
||||
{
|
||||
$this->useIncludePath = $useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to check if the autoloader uses the include path to check
|
||||
* for classes.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUseIncludePath()
|
||||
{
|
||||
return $this->useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns off searching the prefix and fallback directories for classes
|
||||
* that have not been registered with the class map.
|
||||
*
|
||||
* @param bool $classMapAuthoritative
|
||||
*/
|
||||
public function setClassMapAuthoritative($classMapAuthoritative)
|
||||
{
|
||||
$this->classMapAuthoritative = $classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should class lookup fail if not found in the current class map?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isClassMapAuthoritative()
|
||||
{
|
||||
return $this->classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers this instance as an autoloader.
|
||||
*
|
||||
* @param bool $prepend Whether to prepend the autoloader or not
|
||||
*/
|
||||
public function register($prepend = false)
|
||||
{
|
||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters this instance as an autoloader.
|
||||
*/
|
||||
public function unregister()
|
||||
{
|
||||
spl_autoload_unregister(array($this, 'loadClass'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the given class or interface.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
* @return bool|null True if loaded, null otherwise
|
||||
*/
|
||||
public function loadClass($class)
|
||||
{
|
||||
if ($file = $this->findFile($class)) {
|
||||
includeFile($file);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the path to the file where the class is defined.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
*
|
||||
* @return string|false The path if found, false otherwise
|
||||
*/
|
||||
public function findFile($class)
|
||||
{
|
||||
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
|
||||
if ('\\' == $class[0]) {
|
||||
$class = substr($class, 1);
|
||||
}
|
||||
|
||||
// class map lookup
|
||||
if (isset($this->classMap[$class])) {
|
||||
return $this->classMap[$class];
|
||||
}
|
||||
if ($this->classMapAuthoritative) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$file = $this->findFileWithExtension($class, '.php');
|
||||
|
||||
// Search for Hack files if we are running on HHVM
|
||||
if ($file === null && defined('HHVM_VERSION')) {
|
||||
$file = $this->findFileWithExtension($class, '.hh');
|
||||
}
|
||||
|
||||
if ($file === null) {
|
||||
// Remember that this class does not exist.
|
||||
return $this->classMap[$class] = false;
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
private function findFileWithExtension($class, $ext)
|
||||
{
|
||||
// PSR-4 lookup
|
||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||
|
||||
$first = $class[0];
|
||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
||||
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-4 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr4 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 lookup
|
||||
if (false !== $pos = strrpos($class, '\\')) {
|
||||
// namespaced class name
|
||||
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
||||
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
||||
} else {
|
||||
// PEAR-like class name
|
||||
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
||||
}
|
||||
|
||||
if (isset($this->prefixesPsr0[$first])) {
|
||||
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($dirs as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr0 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 include paths.
|
||||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope isolated include.
|
||||
*
|
||||
* Prevents access to $this/self from included files.
|
||||
*/
|
||||
function includeFile($file)
|
||||
{
|
||||
include $file;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
10
docker/nextcloud/custom_apps/ownpad/3rdparty/composer/autoload_classmap.php
vendored
Executable file
10
docker/nextcloud/custom_apps/ownpad/3rdparty/composer/autoload_classmap.php
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = $vendorDir;
|
||||
|
||||
return array(
|
||||
'EtherpadLite\\Client' => $vendorDir . '/tomnomnom/etherpad-lite-client/EtherpadLite/Client.php',
|
||||
);
|
9
docker/nextcloud/custom_apps/ownpad/3rdparty/composer/autoload_namespaces.php
vendored
Executable file
9
docker/nextcloud/custom_apps/ownpad/3rdparty/composer/autoload_namespaces.php
vendored
Executable file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
// autoload_namespaces.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = $vendorDir;
|
||||
|
||||
return array(
|
||||
);
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
// autoload_psr4.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = $vendorDir;
|
||||
|
||||
return array(
|
||||
'EtherpadLite\\' => array($vendorDir . '/tomnomnom/etherpad-lite-client/EtherpadLite'),
|
||||
);
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit14889e338c101f45bb4a1ad143015514
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
public static function loadClassLoader($class)
|
||||
{
|
||||
if ('Composer\Autoload\ClassLoader' === $class) {
|
||||
require __DIR__ . '/ClassLoader.php';
|
||||
}
|
||||
}
|
||||
|
||||
public static function getLoader()
|
||||
{
|
||||
if (null !== self::$loader) {
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit14889e338c101f45bb4a1ad143015514', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit14889e338c101f45bb4a1ad143015514', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
|
||||
if ($useStaticLoader) {
|
||||
require_once __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit14889e338c101f45bb4a1ad143015514::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
}
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
36
docker/nextcloud/custom_apps/ownpad/3rdparty/composer/autoload_static.php
vendored
Executable file
36
docker/nextcloud/custom_apps/ownpad/3rdparty/composer/autoload_static.php
vendored
Executable file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
// autoload_static.php @generated by Composer
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit14889e338c101f45bb4a1ad143015514
|
||||
{
|
||||
public static $prefixLengthsPsr4 = array (
|
||||
'E' =>
|
||||
array (
|
||||
'EtherpadLite\\' => 13,
|
||||
),
|
||||
);
|
||||
|
||||
public static $prefixDirsPsr4 = array (
|
||||
'EtherpadLite\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tomnomnom/etherpad-lite-client/EtherpadLite',
|
||||
),
|
||||
);
|
||||
|
||||
public static $classMap = array (
|
||||
'EtherpadLite\\Client' => __DIR__ . '/..' . '/tomnomnom/etherpad-lite-client/EtherpadLite/Client.php',
|
||||
);
|
||||
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit14889e338c101f45bb4a1ad143015514::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit14889e338c101f45bb4a1ad143015514::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit14889e338c101f45bb4a1ad143015514::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
[
|
||||
{
|
||||
"name": "tomnomnom/etherpad-lite-client",
|
||||
"version": "0.1.2",
|
||||
"version_normalized": "0.1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/TomNomNom/etherpad-lite-client.git",
|
||||
"reference": "932ac4903d7982038d5d04c03f8f9c809a5356bd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/TomNomNom/etherpad-lite-client/zipball/932ac4903d7982038d5d04c03f8f9c809a5356bd",
|
||||
"reference": "932ac4903d7982038d5d04c03f8f9c809a5356bd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*"
|
||||
},
|
||||
"time": "2016-02-09 14:27:44",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"EtherpadLite\\": "EtherpadLite/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache"
|
||||
],
|
||||
"description": "Etherpad Lite client for PHP",
|
||||
"homepage": "https://github.com/TomNomNom/etherpad-lite-client/"
|
||||
}
|
||||
]
|
4
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/.gitignore
vendored
Executable file
4
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/.gitignore
vendored
Executable file
|
@ -0,0 +1,4 @@
|
|||
*.swp
|
||||
vendor
|
||||
composer.lock
|
||||
|
17
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/CHANGELOG
vendored
Executable file
17
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/CHANGELOG
vendored
Executable file
|
@ -0,0 +1,17 @@
|
|||
Tag: api-v1
|
||||
* All v1 methods implemented.
|
||||
* Start of changelog.
|
||||
|
||||
Tag: api-v1.1 (2012-11-17)
|
||||
* Added v1.1 methods:
|
||||
- listAllGroups
|
||||
- getAuthorName
|
||||
- padUsers
|
||||
- sendClientsMessage
|
||||
|
||||
Tag: api-v.1.2.11 (2015-03-22)
|
||||
* Autogeneration of client methods
|
||||
* Test Suite
|
||||
|
||||
2015-10-07:
|
||||
* Converts boolean arguments to strings
|
575
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/EtherpadLite/Client.php
vendored
Executable file
575
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/EtherpadLite/Client.php
vendored
Executable file
|
@ -0,0 +1,575 @@
|
|||
<?php
|
||||
// The following code is automatically generated by ./tools/generate.php
|
||||
// please edit the files in ./tools/templates/ instead of editing this
|
||||
// file directly.
|
||||
|
||||
namespace EtherpadLite;
|
||||
|
||||
class Client {
|
||||
|
||||
const API_VERSION = '1.2.11';
|
||||
|
||||
const CODE_OK = 0;
|
||||
const CODE_INVALID_PARAMETERS = 1;
|
||||
const CODE_INTERNAL_ERROR = 2;
|
||||
const CODE_INVALID_FUNCTION = 3;
|
||||
const CODE_INVALID_API_KEY = 4;
|
||||
|
||||
protected $apiKey = "";
|
||||
protected $baseUrl = "http://localhost:9001/api";
|
||||
|
||||
public function __construct($apiKey, $baseUrl = null){
|
||||
if (strlen($apiKey) < 1){
|
||||
throw new \InvalidArgumentException("[{$apiKey}] is not a valid API key");
|
||||
}
|
||||
$this->apiKey = $apiKey;
|
||||
|
||||
if (isset($baseUrl)){
|
||||
$this->baseUrl = $baseUrl;
|
||||
}
|
||||
if (!filter_var($this->baseUrl, FILTER_VALIDATE_URL)){
|
||||
throw new \InvalidArgumentException("[{$this->baseUrl}] is not a valid URL");
|
||||
}
|
||||
}
|
||||
|
||||
protected function get($function, array $arguments = array()){
|
||||
return $this->call($function, $arguments, 'GET');
|
||||
}
|
||||
|
||||
protected function post($function, array $arguments = array()){
|
||||
return $this->call($function, $arguments, 'POST');
|
||||
}
|
||||
|
||||
protected function convertBools($candidate){
|
||||
if (is_bool($candidate)){
|
||||
return $candidate? "true" : "false";
|
||||
}
|
||||
return $candidate;
|
||||
}
|
||||
|
||||
protected function call($function, array $arguments = array(), $method = 'GET'){
|
||||
$arguments['apikey'] = $this->apiKey;
|
||||
$arguments = array_map(array($this, 'convertBools'), $arguments);
|
||||
$arguments = http_build_query($arguments, '', '&');
|
||||
$url = $this->baseUrl."/".self::API_VERSION."/".$function;
|
||||
if ($method !== 'POST'){
|
||||
$url .= "?".$arguments;
|
||||
}
|
||||
// use curl of it's available
|
||||
if (function_exists('curl_init')){
|
||||
$c = curl_init($url);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($c, CURLOPT_TIMEOUT, 20);
|
||||
if ($method === 'POST'){
|
||||
curl_setopt($c, CURLOPT_POST, true);
|
||||
curl_setopt($c, CURLOPT_POSTFIELDS, $arguments);
|
||||
}
|
||||
$result = curl_exec($c);
|
||||
curl_close($c);
|
||||
// fallback to plain php
|
||||
} else {
|
||||
$params = array('http' => array('method' => $method, 'ignore_errors' => true, 'header' => 'Content-Type:application/x-www-form-urlencoded'));
|
||||
if ($method === 'POST'){
|
||||
$params['http']['content'] = $arguments;
|
||||
}
|
||||
$context = stream_context_create($params);
|
||||
$fp = fopen($url, 'rb', false, $context);
|
||||
$result = $fp ? stream_get_contents($fp) : null;
|
||||
}
|
||||
|
||||
if(!$result){
|
||||
throw new \UnexpectedValueException("Empty or No Response from the server");
|
||||
}
|
||||
|
||||
$result = json_decode($result);
|
||||
if ($result === null){
|
||||
throw new \UnexpectedValueException("JSON response could not be decoded");
|
||||
}
|
||||
return $this->handleResult($result);
|
||||
}
|
||||
|
||||
protected function handleResult($result){
|
||||
if (!isset($result->code)){
|
||||
throw new \RuntimeException("API response has no code");
|
||||
}
|
||||
if (!isset($result->message)){
|
||||
throw new \RuntimeException("API response has no message");
|
||||
}
|
||||
if (!isset($result->data)){
|
||||
$result->data = null;
|
||||
}
|
||||
|
||||
switch ($result->code){
|
||||
case self::CODE_OK:
|
||||
return $result->data;
|
||||
case self::CODE_INVALID_PARAMETERS:
|
||||
case self::CODE_INVALID_API_KEY:
|
||||
throw new \InvalidArgumentException($result->message);
|
||||
case self::CODE_INTERNAL_ERROR:
|
||||
throw new \RuntimeException($result->message);
|
||||
case self::CODE_INVALID_FUNCTION:
|
||||
throw new \BadFunctionCallException($result->message);
|
||||
default:
|
||||
throw new \RuntimeException("An unexpected error occurred whilst handling the response");
|
||||
}
|
||||
}
|
||||
|
||||
// createGroup
|
||||
public function createGroup(){
|
||||
$params = array();
|
||||
|
||||
|
||||
return $this->post("createGroup", $params);
|
||||
}
|
||||
|
||||
// createGroupIfNotExistsFor
|
||||
public function createGroupIfNotExistsFor($groupMapper){
|
||||
$params = array();
|
||||
|
||||
$params['groupMapper'] = $groupMapper;
|
||||
|
||||
return $this->post("createGroupIfNotExistsFor", $params);
|
||||
}
|
||||
|
||||
// deleteGroup
|
||||
public function deleteGroup($groupID){
|
||||
$params = array();
|
||||
|
||||
$params['groupID'] = $groupID;
|
||||
|
||||
return $this->post("deleteGroup", $params);
|
||||
}
|
||||
|
||||
// listPads
|
||||
public function listPads($groupID){
|
||||
$params = array();
|
||||
|
||||
$params['groupID'] = $groupID;
|
||||
|
||||
return $this->get("listPads", $params);
|
||||
}
|
||||
|
||||
// listAllPads
|
||||
public function listAllPads(){
|
||||
$params = array();
|
||||
|
||||
|
||||
return $this->get("listAllPads", $params);
|
||||
}
|
||||
|
||||
// createDiffHTML
|
||||
public function createDiffHTML($padID, $startRev, $endRev){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['startRev'] = $startRev;
|
||||
$params['endRev'] = $endRev;
|
||||
|
||||
return $this->post("createDiffHTML", $params);
|
||||
}
|
||||
|
||||
// createPad
|
||||
public function createPad($padID, $text = null){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
if (isset($text)){
|
||||
$params['text'] = $text;
|
||||
}
|
||||
|
||||
return $this->post("createPad", $params);
|
||||
}
|
||||
|
||||
// createGroupPad
|
||||
public function createGroupPad($groupID, $padName, $text = null){
|
||||
$params = array();
|
||||
|
||||
$params['groupID'] = $groupID;
|
||||
$params['padName'] = $padName;
|
||||
if (isset($text)){
|
||||
$params['text'] = $text;
|
||||
}
|
||||
|
||||
return $this->post("createGroupPad", $params);
|
||||
}
|
||||
|
||||
// createAuthor
|
||||
public function createAuthor($name = null){
|
||||
$params = array();
|
||||
|
||||
if (isset($name)){
|
||||
$params['name'] = $name;
|
||||
}
|
||||
|
||||
return $this->post("createAuthor", $params);
|
||||
}
|
||||
|
||||
// createAuthorIfNotExistsFor
|
||||
public function createAuthorIfNotExistsFor($authorMapper, $name = null){
|
||||
$params = array();
|
||||
|
||||
$params['authorMapper'] = $authorMapper;
|
||||
if (isset($name)){
|
||||
$params['name'] = $name;
|
||||
}
|
||||
|
||||
return $this->post("createAuthorIfNotExistsFor", $params);
|
||||
}
|
||||
|
||||
// listPadsOfAuthor
|
||||
public function listPadsOfAuthor($authorID){
|
||||
$params = array();
|
||||
|
||||
$params['authorID'] = $authorID;
|
||||
|
||||
return $this->get("listPadsOfAuthor", $params);
|
||||
}
|
||||
|
||||
// createSession
|
||||
public function createSession($groupID, $authorID, $validUntil){
|
||||
$params = array();
|
||||
|
||||
$params['groupID'] = $groupID;
|
||||
$params['authorID'] = $authorID;
|
||||
$params['validUntil'] = $validUntil;
|
||||
|
||||
return $this->post("createSession", $params);
|
||||
}
|
||||
|
||||
// deleteSession
|
||||
public function deleteSession($sessionID){
|
||||
$params = array();
|
||||
|
||||
$params['sessionID'] = $sessionID;
|
||||
|
||||
return $this->post("deleteSession", $params);
|
||||
}
|
||||
|
||||
// getSessionInfo
|
||||
public function getSessionInfo($sessionID){
|
||||
$params = array();
|
||||
|
||||
$params['sessionID'] = $sessionID;
|
||||
|
||||
return $this->get("getSessionInfo", $params);
|
||||
}
|
||||
|
||||
// listSessionsOfGroup
|
||||
public function listSessionsOfGroup($groupID){
|
||||
$params = array();
|
||||
|
||||
$params['groupID'] = $groupID;
|
||||
|
||||
return $this->get("listSessionsOfGroup", $params);
|
||||
}
|
||||
|
||||
// listSessionsOfAuthor
|
||||
public function listSessionsOfAuthor($authorID){
|
||||
$params = array();
|
||||
|
||||
$params['authorID'] = $authorID;
|
||||
|
||||
return $this->get("listSessionsOfAuthor", $params);
|
||||
}
|
||||
|
||||
// getText
|
||||
public function getText($padID, $rev = null){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
if (isset($rev)){
|
||||
$params['rev'] = $rev;
|
||||
}
|
||||
|
||||
return $this->get("getText", $params);
|
||||
}
|
||||
|
||||
// setText
|
||||
public function setText($padID, $text){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['text'] = $text;
|
||||
|
||||
return $this->post("setText", $params);
|
||||
}
|
||||
|
||||
// getHTML
|
||||
public function getHTML($padID, $rev = null){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
if (isset($rev)){
|
||||
$params['rev'] = $rev;
|
||||
}
|
||||
|
||||
return $this->get("getHTML", $params);
|
||||
}
|
||||
|
||||
// setHTML
|
||||
public function setHTML($padID, $html){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['html'] = $html;
|
||||
|
||||
return $this->post("setHTML", $params);
|
||||
}
|
||||
|
||||
// getAttributePool
|
||||
public function getAttributePool($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getAttributePool", $params);
|
||||
}
|
||||
|
||||
// getRevisionsCount
|
||||
public function getRevisionsCount($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getRevisionsCount", $params);
|
||||
}
|
||||
|
||||
// getSavedRevisionsCount
|
||||
public function getSavedRevisionsCount($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getSavedRevisionsCount", $params);
|
||||
}
|
||||
|
||||
// listSavedRevisions
|
||||
public function listSavedRevisions($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("listSavedRevisions", $params);
|
||||
}
|
||||
|
||||
// saveRevision
|
||||
public function saveRevision($padID, $rev){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['rev'] = $rev;
|
||||
|
||||
return $this->post("saveRevision", $params);
|
||||
}
|
||||
|
||||
// getRevisionChangeset
|
||||
public function getRevisionChangeset($padID, $rev = null){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
if (isset($rev)){
|
||||
$params['rev'] = $rev;
|
||||
}
|
||||
|
||||
return $this->get("getRevisionChangeset", $params);
|
||||
}
|
||||
|
||||
// getLastEdited
|
||||
public function getLastEdited($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getLastEdited", $params);
|
||||
}
|
||||
|
||||
// deletePad
|
||||
public function deletePad($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->post("deletePad", $params);
|
||||
}
|
||||
|
||||
// copyPad
|
||||
public function copyPad($sourceID, $destinationID, $force = null){
|
||||
$params = array();
|
||||
|
||||
$params['sourceID'] = $sourceID;
|
||||
$params['destinationID'] = $destinationID;
|
||||
if (isset($force)){
|
||||
$params['force'] = $force;
|
||||
}
|
||||
|
||||
return $this->post("copyPad", $params);
|
||||
}
|
||||
|
||||
// movePad
|
||||
public function movePad($sourceID, $destinationID, $force = null){
|
||||
$params = array();
|
||||
|
||||
$params['sourceID'] = $sourceID;
|
||||
$params['destinationID'] = $destinationID;
|
||||
if (isset($force)){
|
||||
$params['force'] = $force;
|
||||
}
|
||||
|
||||
return $this->post("movePad", $params);
|
||||
}
|
||||
|
||||
// getReadOnlyID
|
||||
public function getReadOnlyID($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getReadOnlyID", $params);
|
||||
}
|
||||
|
||||
// getPadID
|
||||
public function getPadID($roID){
|
||||
$params = array();
|
||||
|
||||
$params['roID'] = $roID;
|
||||
|
||||
return $this->get("getPadID", $params);
|
||||
}
|
||||
|
||||
// setPublicStatus
|
||||
public function setPublicStatus($padID, $publicStatus){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['publicStatus'] = $publicStatus;
|
||||
|
||||
return $this->post("setPublicStatus", $params);
|
||||
}
|
||||
|
||||
// getPublicStatus
|
||||
public function getPublicStatus($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getPublicStatus", $params);
|
||||
}
|
||||
|
||||
// setPassword
|
||||
public function setPassword($padID, $password){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['password'] = $password;
|
||||
|
||||
return $this->post("setPassword", $params);
|
||||
}
|
||||
|
||||
// isPasswordProtected
|
||||
public function isPasswordProtected($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("isPasswordProtected", $params);
|
||||
}
|
||||
|
||||
// listAuthorsOfPad
|
||||
public function listAuthorsOfPad($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("listAuthorsOfPad", $params);
|
||||
}
|
||||
|
||||
// padUsersCount
|
||||
public function padUsersCount($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("padUsersCount", $params);
|
||||
}
|
||||
|
||||
// getAuthorName
|
||||
public function getAuthorName($authorID){
|
||||
$params = array();
|
||||
|
||||
$params['authorID'] = $authorID;
|
||||
|
||||
return $this->get("getAuthorName", $params);
|
||||
}
|
||||
|
||||
// padUsers
|
||||
public function padUsers($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("padUsers", $params);
|
||||
}
|
||||
|
||||
// sendClientsMessage
|
||||
public function sendClientsMessage($padID, $msg){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['msg'] = $msg;
|
||||
|
||||
return $this->post("sendClientsMessage", $params);
|
||||
}
|
||||
|
||||
// listAllGroups
|
||||
public function listAllGroups(){
|
||||
$params = array();
|
||||
|
||||
|
||||
return $this->get("listAllGroups", $params);
|
||||
}
|
||||
|
||||
// checkToken
|
||||
public function checkToken(){
|
||||
$params = array();
|
||||
|
||||
|
||||
return $this->post("checkToken", $params);
|
||||
}
|
||||
|
||||
// getChatHistory
|
||||
public function getChatHistory($padID, $start = null, $end = null){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
if (isset($start)){
|
||||
$params['start'] = $start;
|
||||
}
|
||||
if (isset($end)){
|
||||
$params['end'] = $end;
|
||||
}
|
||||
|
||||
return $this->get("getChatHistory", $params);
|
||||
}
|
||||
|
||||
// getChatHead
|
||||
public function getChatHead($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getChatHead", $params);
|
||||
}
|
||||
|
||||
// restoreRevision
|
||||
public function restoreRevision($padID, $rev){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['rev'] = $rev;
|
||||
|
||||
return $this->post("restoreRevision", $params);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
10
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/Makefile
vendored
Executable file
10
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/Makefile
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
test:
|
||||
./vendor/bin/phpunit --colors --verbose
|
||||
|
||||
dev-deps:
|
||||
composer install --dev
|
||||
|
||||
client:
|
||||
php ./tools/generate.php > ./EtherpadLite/Client.php
|
||||
|
||||
.PHONY: all test clean
|
45
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/README.md
vendored
Executable file
45
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/README.md
vendored
Executable file
|
@ -0,0 +1,45 @@
|
|||
# PHP Etherpad Lite Client
|
||||
This PHP Etherpad Lite class allows you to easily interact with Etherpad Lite API with PHP.
|
||||
Etherpad Lite is a collaborative editor provided by the Etherpad Foundation (http://etherpad.org)
|
||||
|
||||
## Basic Usage
|
||||
|
||||
Install from packagist:
|
||||
|
||||
```
|
||||
composer require tomnomnom/etherpad-lite-client
|
||||
```
|
||||
|
||||
A legacy `etherpad-lite-client.php` file is included for people who are unwilling/unable to switch to the new
|
||||
namespaced version, but it is deprecated and will be removed in future versions.
|
||||
|
||||
```php
|
||||
<?php
|
||||
require 'vendor/autoload.php';
|
||||
$instance = new EtherpadLite\Client('EtherpadFTW', 'http://beta.etherpad.org/api');
|
||||
$revisionCount = $instance->getRevisionsCount('testPad');
|
||||
$revisionCount = $revisionCount->revisions;
|
||||
echo "Pad has $revisionCount revisions";
|
||||
```
|
||||
|
||||
# Running The Tests
|
||||
The full-stack tests can be run by running `make test`.
|
||||
|
||||
The test suite makes the following assumptions:
|
||||
|
||||
* A copy of Etherpad is running at http://localhost:9001
|
||||
* The data in the running instance of Etherpad can be destroyed
|
||||
* The APIKey for the running instance is 'dcf118bfc58cc69cdf3ae870071f97149924f5f5a9a4a552fd2921b40830aaae'
|
||||
* PHPUnit has been installed with [Composer](https://getcomposer.org/) (run `make dev-deps`)
|
||||
|
||||
A Dockerfile is provided in `tools/testcontainer` to ease setup of a test instance.
|
||||
|
||||
# License
|
||||
|
||||
Apache License
|
||||
|
||||
# Other Stuff
|
||||
|
||||
The Etherpad Foundation also provides a jQuery plugin for Etherpad Lite.
|
||||
This can be found at http://etherpad.org/2011/08/14/etherpad-lite-jquery-plugin/
|
||||
|
51
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/api-spec.json
vendored
Executable file
51
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/api-spec.json
vendored
Executable file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"version": "1.2.11",
|
||||
"methods":
|
||||
{ "createGroup" : []
|
||||
, "createGroupIfNotExistsFor" : ["groupMapper"]
|
||||
, "deleteGroup" : ["groupID"]
|
||||
, "listPads" : ["groupID"]
|
||||
, "listAllPads" : []
|
||||
, "createDiffHTML" : ["padID", "startRev", "endRev"]
|
||||
, "createPad" : ["padID", "[text]"]
|
||||
, "createGroupPad" : ["groupID", "padName", "[text]"]
|
||||
, "createAuthor" : ["[name]"]
|
||||
, "createAuthorIfNotExistsFor": ["authorMapper" , "[name]"]
|
||||
, "listPadsOfAuthor" : ["authorID"]
|
||||
, "createSession" : ["groupID", "authorID", "validUntil"]
|
||||
, "deleteSession" : ["sessionID"]
|
||||
, "getSessionInfo" : ["sessionID"]
|
||||
, "listSessionsOfGroup" : ["groupID"]
|
||||
, "listSessionsOfAuthor" : ["authorID"]
|
||||
, "getText" : ["padID", "[rev]"]
|
||||
, "setText" : ["padID", "text"]
|
||||
, "getHTML" : ["padID", "[rev]"]
|
||||
, "setHTML" : ["padID", "html"]
|
||||
, "getAttributePool" : ["padID"]
|
||||
, "getRevisionsCount" : ["padID"]
|
||||
, "getSavedRevisionsCount" : ["padID"]
|
||||
, "listSavedRevisions" : ["padID"]
|
||||
, "saveRevision" : ["padID", "rev"]
|
||||
, "getRevisionChangeset" : ["padID", "[rev]"]
|
||||
, "getLastEdited" : ["padID"]
|
||||
, "deletePad" : ["padID"]
|
||||
, "copyPad" : ["sourceID", "destinationID", "[force]"]
|
||||
, "movePad" : ["sourceID", "destinationID", "[force]"]
|
||||
, "getReadOnlyID" : ["padID"]
|
||||
, "getPadID" : ["roID"]
|
||||
, "setPublicStatus" : ["padID", "publicStatus"]
|
||||
, "getPublicStatus" : ["padID"]
|
||||
, "setPassword" : ["padID", "password"]
|
||||
, "isPasswordProtected" : ["padID"]
|
||||
, "listAuthorsOfPad" : ["padID"]
|
||||
, "padUsersCount" : ["padID"]
|
||||
, "getAuthorName" : ["authorID"]
|
||||
, "padUsers" : ["padID"]
|
||||
, "sendClientsMessage" : ["padID", "msg"]
|
||||
, "listAllGroups" : []
|
||||
, "checkToken" : []
|
||||
, "getChatHistory" : ["padID", "[start]", "[end]"]
|
||||
, "getChatHead" : ["padID"]
|
||||
, "restoreRevision" : ["padID", "rev"]
|
||||
}
|
||||
}
|
13
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/composer.json
vendored
Executable file
13
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/composer.json
vendored
Executable file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "tomnomnom/etherpad-lite-client",
|
||||
"description": "Etherpad Lite client for PHP",
|
||||
"homepage": "https://github.com/TomNomNom/etherpad-lite-client/",
|
||||
"license": "Apache",
|
||||
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {"EtherpadLite\\": "EtherpadLite/"}
|
||||
}
|
||||
}
|
573
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/etherpad-lite-client.php
vendored
Executable file
573
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/etherpad-lite-client.php
vendored
Executable file
|
@ -0,0 +1,573 @@
|
|||
<?php
|
||||
// The following code is automatically generated by ./tools/generate.php
|
||||
// please edit the files in ./tools/templates/ instead of editing this
|
||||
// file directly.
|
||||
|
||||
class EtherpadLiteClient {
|
||||
|
||||
const API_VERSION = '1.2.11';
|
||||
|
||||
const CODE_OK = 0;
|
||||
const CODE_INVALID_PARAMETERS = 1;
|
||||
const CODE_INTERNAL_ERROR = 2;
|
||||
const CODE_INVALID_FUNCTION = 3;
|
||||
const CODE_INVALID_API_KEY = 4;
|
||||
|
||||
protected $apiKey = "";
|
||||
protected $baseUrl = "http://localhost:9001/api";
|
||||
|
||||
public function __construct($apiKey, $baseUrl = null){
|
||||
if (strlen($apiKey) < 1){
|
||||
throw new InvalidArgumentException("[{$apiKey}] is not a valid API key");
|
||||
}
|
||||
$this->apiKey = $apiKey;
|
||||
|
||||
if (isset($baseUrl)){
|
||||
$this->baseUrl = $baseUrl;
|
||||
}
|
||||
if (!filter_var($this->baseUrl, FILTER_VALIDATE_URL)){
|
||||
throw new InvalidArgumentException("[{$this->baseUrl}] is not a valid URL");
|
||||
}
|
||||
}
|
||||
|
||||
protected function get($function, array $arguments = array()){
|
||||
return $this->call($function, $arguments, 'GET');
|
||||
}
|
||||
|
||||
protected function post($function, array $arguments = array()){
|
||||
return $this->call($function, $arguments, 'POST');
|
||||
}
|
||||
|
||||
protected function convertBools($candidate){
|
||||
if (is_bool($candidate)){
|
||||
return $candidate? "true" : "false";
|
||||
}
|
||||
return $candidate;
|
||||
}
|
||||
|
||||
protected function call($function, array $arguments = array(), $method = 'GET'){
|
||||
$arguments['apikey'] = $this->apiKey;
|
||||
$arguments = array_map(array($this, 'convertBools'), $arguments);
|
||||
$arguments = http_build_query($arguments, '', '&');
|
||||
$url = $this->baseUrl."/".self::API_VERSION."/".$function;
|
||||
if ($method !== 'POST'){
|
||||
$url .= "?".$arguments;
|
||||
}
|
||||
// use curl of it's available
|
||||
if (function_exists('curl_init')){
|
||||
$c = curl_init($url);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($c, CURLOPT_TIMEOUT, 20);
|
||||
if ($method === 'POST'){
|
||||
curl_setopt($c, CURLOPT_POST, true);
|
||||
curl_setopt($c, CURLOPT_POSTFIELDS, $arguments);
|
||||
}
|
||||
$result = curl_exec($c);
|
||||
curl_close($c);
|
||||
// fallback to plain php
|
||||
} else {
|
||||
$params = array('http' => array('method' => $method, 'ignore_errors' => true, 'header' => 'Content-Type:application/x-www-form-urlencoded'));
|
||||
if ($method === 'POST'){
|
||||
$params['http']['content'] = $arguments;
|
||||
}
|
||||
$context = stream_context_create($params);
|
||||
$fp = fopen($url, 'rb', false, $context);
|
||||
$result = $fp ? stream_get_contents($fp) : null;
|
||||
}
|
||||
|
||||
if(!$result){
|
||||
throw new UnexpectedValueException("Empty or No Response from the server");
|
||||
}
|
||||
|
||||
$result = json_decode($result);
|
||||
if ($result === null){
|
||||
throw new UnexpectedValueException("JSON response could not be decoded");
|
||||
}
|
||||
return $this->handleResult($result);
|
||||
}
|
||||
|
||||
protected function handleResult($result){
|
||||
if (!isset($result->code)){
|
||||
throw new RuntimeException("API response has no code");
|
||||
}
|
||||
if (!isset($result->message)){
|
||||
throw new RuntimeException("API response has no message");
|
||||
}
|
||||
if (!isset($result->data)){
|
||||
$result->data = null;
|
||||
}
|
||||
|
||||
switch ($result->code){
|
||||
case self::CODE_OK:
|
||||
return $result->data;
|
||||
case self::CODE_INVALID_PARAMETERS:
|
||||
case self::CODE_INVALID_API_KEY:
|
||||
throw new InvalidArgumentException($result->message);
|
||||
case self::CODE_INTERNAL_ERROR:
|
||||
throw new RuntimeException($result->message);
|
||||
case self::CODE_INVALID_FUNCTION:
|
||||
throw new BadFunctionCallException($result->message);
|
||||
default:
|
||||
throw new RuntimeException("An unexpected error occurred whilst handling the response");
|
||||
}
|
||||
}
|
||||
|
||||
// createGroup
|
||||
public function createGroup(){
|
||||
$params = array();
|
||||
|
||||
|
||||
return $this->post("createGroup", $params);
|
||||
}
|
||||
|
||||
// createGroupIfNotExistsFor
|
||||
public function createGroupIfNotExistsFor($groupMapper){
|
||||
$params = array();
|
||||
|
||||
$params['groupMapper'] = $groupMapper;
|
||||
|
||||
return $this->post("createGroupIfNotExistsFor", $params);
|
||||
}
|
||||
|
||||
// deleteGroup
|
||||
public function deleteGroup($groupID){
|
||||
$params = array();
|
||||
|
||||
$params['groupID'] = $groupID;
|
||||
|
||||
return $this->post("deleteGroup", $params);
|
||||
}
|
||||
|
||||
// listPads
|
||||
public function listPads($groupID){
|
||||
$params = array();
|
||||
|
||||
$params['groupID'] = $groupID;
|
||||
|
||||
return $this->get("listPads", $params);
|
||||
}
|
||||
|
||||
// listAllPads
|
||||
public function listAllPads(){
|
||||
$params = array();
|
||||
|
||||
|
||||
return $this->get("listAllPads", $params);
|
||||
}
|
||||
|
||||
// createDiffHTML
|
||||
public function createDiffHTML($padID, $startRev, $endRev){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['startRev'] = $startRev;
|
||||
$params['endRev'] = $endRev;
|
||||
|
||||
return $this->post("createDiffHTML", $params);
|
||||
}
|
||||
|
||||
// createPad
|
||||
public function createPad($padID, $text = null){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
if (isset($text)){
|
||||
$params['text'] = $text;
|
||||
}
|
||||
|
||||
return $this->post("createPad", $params);
|
||||
}
|
||||
|
||||
// createGroupPad
|
||||
public function createGroupPad($groupID, $padName, $text = null){
|
||||
$params = array();
|
||||
|
||||
$params['groupID'] = $groupID;
|
||||
$params['padName'] = $padName;
|
||||
if (isset($text)){
|
||||
$params['text'] = $text;
|
||||
}
|
||||
|
||||
return $this->post("createGroupPad", $params);
|
||||
}
|
||||
|
||||
// createAuthor
|
||||
public function createAuthor($name = null){
|
||||
$params = array();
|
||||
|
||||
if (isset($name)){
|
||||
$params['name'] = $name;
|
||||
}
|
||||
|
||||
return $this->post("createAuthor", $params);
|
||||
}
|
||||
|
||||
// createAuthorIfNotExistsFor
|
||||
public function createAuthorIfNotExistsFor($authorMapper, $name = null){
|
||||
$params = array();
|
||||
|
||||
$params['authorMapper'] = $authorMapper;
|
||||
if (isset($name)){
|
||||
$params['name'] = $name;
|
||||
}
|
||||
|
||||
return $this->post("createAuthorIfNotExistsFor", $params);
|
||||
}
|
||||
|
||||
// listPadsOfAuthor
|
||||
public function listPadsOfAuthor($authorID){
|
||||
$params = array();
|
||||
|
||||
$params['authorID'] = $authorID;
|
||||
|
||||
return $this->get("listPadsOfAuthor", $params);
|
||||
}
|
||||
|
||||
// createSession
|
||||
public function createSession($groupID, $authorID, $validUntil){
|
||||
$params = array();
|
||||
|
||||
$params['groupID'] = $groupID;
|
||||
$params['authorID'] = $authorID;
|
||||
$params['validUntil'] = $validUntil;
|
||||
|
||||
return $this->post("createSession", $params);
|
||||
}
|
||||
|
||||
// deleteSession
|
||||
public function deleteSession($sessionID){
|
||||
$params = array();
|
||||
|
||||
$params['sessionID'] = $sessionID;
|
||||
|
||||
return $this->post("deleteSession", $params);
|
||||
}
|
||||
|
||||
// getSessionInfo
|
||||
public function getSessionInfo($sessionID){
|
||||
$params = array();
|
||||
|
||||
$params['sessionID'] = $sessionID;
|
||||
|
||||
return $this->get("getSessionInfo", $params);
|
||||
}
|
||||
|
||||
// listSessionsOfGroup
|
||||
public function listSessionsOfGroup($groupID){
|
||||
$params = array();
|
||||
|
||||
$params['groupID'] = $groupID;
|
||||
|
||||
return $this->get("listSessionsOfGroup", $params);
|
||||
}
|
||||
|
||||
// listSessionsOfAuthor
|
||||
public function listSessionsOfAuthor($authorID){
|
||||
$params = array();
|
||||
|
||||
$params['authorID'] = $authorID;
|
||||
|
||||
return $this->get("listSessionsOfAuthor", $params);
|
||||
}
|
||||
|
||||
// getText
|
||||
public function getText($padID, $rev = null){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
if (isset($rev)){
|
||||
$params['rev'] = $rev;
|
||||
}
|
||||
|
||||
return $this->get("getText", $params);
|
||||
}
|
||||
|
||||
// setText
|
||||
public function setText($padID, $text){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['text'] = $text;
|
||||
|
||||
return $this->post("setText", $params);
|
||||
}
|
||||
|
||||
// getHTML
|
||||
public function getHTML($padID, $rev = null){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
if (isset($rev)){
|
||||
$params['rev'] = $rev;
|
||||
}
|
||||
|
||||
return $this->get("getHTML", $params);
|
||||
}
|
||||
|
||||
// setHTML
|
||||
public function setHTML($padID, $html){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['html'] = $html;
|
||||
|
||||
return $this->post("setHTML", $params);
|
||||
}
|
||||
|
||||
// getAttributePool
|
||||
public function getAttributePool($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getAttributePool", $params);
|
||||
}
|
||||
|
||||
// getRevisionsCount
|
||||
public function getRevisionsCount($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getRevisionsCount", $params);
|
||||
}
|
||||
|
||||
// getSavedRevisionsCount
|
||||
public function getSavedRevisionsCount($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getSavedRevisionsCount", $params);
|
||||
}
|
||||
|
||||
// listSavedRevisions
|
||||
public function listSavedRevisions($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("listSavedRevisions", $params);
|
||||
}
|
||||
|
||||
// saveRevision
|
||||
public function saveRevision($padID, $rev){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['rev'] = $rev;
|
||||
|
||||
return $this->post("saveRevision", $params);
|
||||
}
|
||||
|
||||
// getRevisionChangeset
|
||||
public function getRevisionChangeset($padID, $rev = null){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
if (isset($rev)){
|
||||
$params['rev'] = $rev;
|
||||
}
|
||||
|
||||
return $this->get("getRevisionChangeset", $params);
|
||||
}
|
||||
|
||||
// getLastEdited
|
||||
public function getLastEdited($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getLastEdited", $params);
|
||||
}
|
||||
|
||||
// deletePad
|
||||
public function deletePad($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->post("deletePad", $params);
|
||||
}
|
||||
|
||||
// copyPad
|
||||
public function copyPad($sourceID, $destinationID, $force = null){
|
||||
$params = array();
|
||||
|
||||
$params['sourceID'] = $sourceID;
|
||||
$params['destinationID'] = $destinationID;
|
||||
if (isset($force)){
|
||||
$params['force'] = $force;
|
||||
}
|
||||
|
||||
return $this->post("copyPad", $params);
|
||||
}
|
||||
|
||||
// movePad
|
||||
public function movePad($sourceID, $destinationID, $force = null){
|
||||
$params = array();
|
||||
|
||||
$params['sourceID'] = $sourceID;
|
||||
$params['destinationID'] = $destinationID;
|
||||
if (isset($force)){
|
||||
$params['force'] = $force;
|
||||
}
|
||||
|
||||
return $this->post("movePad", $params);
|
||||
}
|
||||
|
||||
// getReadOnlyID
|
||||
public function getReadOnlyID($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getReadOnlyID", $params);
|
||||
}
|
||||
|
||||
// getPadID
|
||||
public function getPadID($roID){
|
||||
$params = array();
|
||||
|
||||
$params['roID'] = $roID;
|
||||
|
||||
return $this->get("getPadID", $params);
|
||||
}
|
||||
|
||||
// setPublicStatus
|
||||
public function setPublicStatus($padID, $publicStatus){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['publicStatus'] = $publicStatus;
|
||||
|
||||
return $this->post("setPublicStatus", $params);
|
||||
}
|
||||
|
||||
// getPublicStatus
|
||||
public function getPublicStatus($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getPublicStatus", $params);
|
||||
}
|
||||
|
||||
// setPassword
|
||||
public function setPassword($padID, $password){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['password'] = $password;
|
||||
|
||||
return $this->post("setPassword", $params);
|
||||
}
|
||||
|
||||
// isPasswordProtected
|
||||
public function isPasswordProtected($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("isPasswordProtected", $params);
|
||||
}
|
||||
|
||||
// listAuthorsOfPad
|
||||
public function listAuthorsOfPad($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("listAuthorsOfPad", $params);
|
||||
}
|
||||
|
||||
// padUsersCount
|
||||
public function padUsersCount($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("padUsersCount", $params);
|
||||
}
|
||||
|
||||
// getAuthorName
|
||||
public function getAuthorName($authorID){
|
||||
$params = array();
|
||||
|
||||
$params['authorID'] = $authorID;
|
||||
|
||||
return $this->get("getAuthorName", $params);
|
||||
}
|
||||
|
||||
// padUsers
|
||||
public function padUsers($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("padUsers", $params);
|
||||
}
|
||||
|
||||
// sendClientsMessage
|
||||
public function sendClientsMessage($padID, $msg){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['msg'] = $msg;
|
||||
|
||||
return $this->post("sendClientsMessage", $params);
|
||||
}
|
||||
|
||||
// listAllGroups
|
||||
public function listAllGroups(){
|
||||
$params = array();
|
||||
|
||||
|
||||
return $this->get("listAllGroups", $params);
|
||||
}
|
||||
|
||||
// checkToken
|
||||
public function checkToken(){
|
||||
$params = array();
|
||||
|
||||
|
||||
return $this->post("checkToken", $params);
|
||||
}
|
||||
|
||||
// getChatHistory
|
||||
public function getChatHistory($padID, $start = null, $end = null){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
if (isset($start)){
|
||||
$params['start'] = $start;
|
||||
}
|
||||
if (isset($end)){
|
||||
$params['end'] = $end;
|
||||
}
|
||||
|
||||
return $this->get("getChatHistory", $params);
|
||||
}
|
||||
|
||||
// getChatHead
|
||||
public function getChatHead($padID){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
|
||||
return $this->get("getChatHead", $params);
|
||||
}
|
||||
|
||||
// restoreRevision
|
||||
public function restoreRevision($padID, $rev){
|
||||
$params = array();
|
||||
|
||||
$params['padID'] = $padID;
|
||||
$params['rev'] = $rev;
|
||||
|
||||
return $this->post("restoreRevision", $params);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
7
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/phpunit.xml
vendored
Executable file
7
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/phpunit.xml
vendored
Executable file
|
@ -0,0 +1,7 @@
|
|||
<phpunit>
|
||||
<testsuites>
|
||||
<testsuite name="FullStack">
|
||||
<directory>test/FullStack</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
20
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/test/FullStack/AuthorTest.php
vendored
Executable file
20
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/test/FullStack/AuthorTest.php
vendored
Executable file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
require_once __DIR__.'/../../EtherpadLite/Client.php';
|
||||
|
||||
class AuthorTest extends \PHPUnit_Framework_TestCase {
|
||||
|
||||
protected function newClient(){
|
||||
return new \EtherpadLite\Client("dcf118bfc58cc69cdf3ae870071f97149924f5f5a9a4a552fd2921b40830aaae");
|
||||
}
|
||||
|
||||
public function testAuthor(){
|
||||
$client = $this->newClient();
|
||||
|
||||
$a = $client->createAuthor('Bob');
|
||||
$this->assertTrue(is_string($a->authorID));
|
||||
|
||||
$n = $client->getAuthorName($a->authorID);
|
||||
$this->assertEquals("Bob", $n);
|
||||
}
|
||||
|
||||
}
|
45
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/test/FullStack/GroupsTest.php
vendored
Executable file
45
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/test/FullStack/GroupsTest.php
vendored
Executable file
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
require_once __DIR__.'/../../etherpad-lite-client.php';
|
||||
|
||||
class GroupsTest extends \PHPUnit_Framework_TestCase {
|
||||
|
||||
protected function newClient(){
|
||||
return new \EtherpadLite\Client("dcf118bfc58cc69cdf3ae870071f97149924f5f5a9a4a552fd2921b40830aaae");
|
||||
}
|
||||
|
||||
public function testCreateDeleteGroup(){
|
||||
$client = $this->newClient();
|
||||
|
||||
// Create a group
|
||||
$group = $client->createGroup();
|
||||
$this->assertTrue(is_string($group->groupID));
|
||||
|
||||
// Delete it
|
||||
$r = $client->deleteGroup($group->groupID);
|
||||
$this->assertNull($r);
|
||||
|
||||
// Try to delete it again
|
||||
try {
|
||||
$client->deleteGroup($group->groupID);
|
||||
$this->fail("deleteGroup should fail if group does not exist");
|
||||
} catch (\InvalidArgumentException $e){
|
||||
$this->assertTrue(true); // Just to keep the counter up ;)
|
||||
}
|
||||
}
|
||||
|
||||
public function testListGroups(){
|
||||
$client = $this->newClient();
|
||||
|
||||
// Create a couple of groups
|
||||
$one = $client->createGroup();
|
||||
$two = $client->createGroup();
|
||||
|
||||
$groups = $client->listAllGroups();
|
||||
$this->assertContains($one->groupID, $groups->groupIDs);
|
||||
$this->assertContains($two->groupID, $groups->groupIDs);
|
||||
|
||||
// Clean up
|
||||
$client->deleteGroup($one->groupID);
|
||||
$client->deleteGroup($two->groupID);
|
||||
}
|
||||
}
|
32
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/test/FullStack/PadTest.php
vendored
Executable file
32
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/test/FullStack/PadTest.php
vendored
Executable file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
require_once __DIR__.'/../../EtherpadLite/Client.php';
|
||||
|
||||
class PadTest extends \PHPUnit_Framework_TestCase {
|
||||
|
||||
protected function newClient(){
|
||||
return new \EtherpadLite\Client("dcf118bfc58cc69cdf3ae870071f97149924f5f5a9a4a552fd2921b40830aaae");
|
||||
}
|
||||
|
||||
public function testOneGroupOnePad(){
|
||||
$client = $this->newClient();
|
||||
|
||||
$group = $client->createGroup();
|
||||
$this->assertTrue(is_string($group->groupID));
|
||||
|
||||
$pad = $client->createGroupPad($group->groupID, "PadName", "Default Text");
|
||||
$this->assertTrue(is_string($pad->padID));
|
||||
|
||||
$text = $client->getText($pad->padID);
|
||||
$this->assertEquals("Default Text", trim($text->text));
|
||||
|
||||
$set = $client->setText($pad->padID, "The new text");
|
||||
$this->assertNull($set);
|
||||
|
||||
$text = $client->getText($pad->padID);
|
||||
$this->assertEquals("The new text", trim($text->text));
|
||||
|
||||
$del = $client->deletePad($pad->padID);
|
||||
$this->assertNull($del);
|
||||
}
|
||||
|
||||
}
|
45
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/tools/generate.php
vendored
Executable file
45
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/tools/generate.php
vendored
Executable file
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
// Generates an API client using the api-spec.json
|
||||
|
||||
$raw = file_get_contents(__DIR__.'/../api-spec.json');
|
||||
$spec = json_decode($raw);
|
||||
|
||||
// Pre-process the methods to set httpMethod
|
||||
$methods = array();
|
||||
foreach ($spec->methods as $name => $args){
|
||||
|
||||
// Slightly hacky, but should cover all bases
|
||||
$httpMethod = "post";
|
||||
if (hasPrefix($name, "get") ||
|
||||
hasPrefix($name, "list") ||
|
||||
hasPrefix($name, "pad") ||
|
||||
hasPrefix($name, "is")){
|
||||
$httpMethod = "get";
|
||||
}
|
||||
|
||||
$methods[] = array(
|
||||
"name" => $name,
|
||||
"args" => $args,
|
||||
"httpMethod" => $httpMethod,
|
||||
);
|
||||
}
|
||||
|
||||
echo "<?php\n";
|
||||
|
||||
// Render the template
|
||||
render(__DIR__.'/templates/client.php', array(
|
||||
"version" => $spec->version,
|
||||
"methods" => $methods,
|
||||
));
|
||||
|
||||
function render($template, $data){
|
||||
extract($data);
|
||||
include($template);
|
||||
}
|
||||
|
||||
function hasPrefix($candidate, $prefix){
|
||||
if (strpos($candidate, $prefix) === 0){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
123
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/tools/templates/client.php
vendored
Executable file
123
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/tools/templates/client.php
vendored
Executable file
|
@ -0,0 +1,123 @@
|
|||
// The following code is automatically generated by ./tools/generate.php
|
||||
// please edit the files in ./tools/templates/ instead of editing this
|
||||
// file directly.
|
||||
|
||||
namespace EtherpadLite;
|
||||
|
||||
class Client {
|
||||
|
||||
const API_VERSION = '<?=$version?>';
|
||||
|
||||
const CODE_OK = 0;
|
||||
const CODE_INVALID_PARAMETERS = 1;
|
||||
const CODE_INTERNAL_ERROR = 2;
|
||||
const CODE_INVALID_FUNCTION = 3;
|
||||
const CODE_INVALID_API_KEY = 4;
|
||||
|
||||
protected $apiKey = "";
|
||||
protected $baseUrl = "http://localhost:9001/api";
|
||||
|
||||
public function __construct($apiKey, $baseUrl = null){
|
||||
if (strlen($apiKey) < 1){
|
||||
throw new \InvalidArgumentException("[{$apiKey}] is not a valid API key");
|
||||
}
|
||||
$this->apiKey = $apiKey;
|
||||
|
||||
if (isset($baseUrl)){
|
||||
$this->baseUrl = $baseUrl;
|
||||
}
|
||||
if (!filter_var($this->baseUrl, FILTER_VALIDATE_URL)){
|
||||
throw new \InvalidArgumentException("[{$this->baseUrl}] is not a valid URL");
|
||||
}
|
||||
}
|
||||
|
||||
protected function get($function, array $arguments = array()){
|
||||
return $this->call($function, $arguments, 'GET');
|
||||
}
|
||||
|
||||
protected function post($function, array $arguments = array()){
|
||||
return $this->call($function, $arguments, 'POST');
|
||||
}
|
||||
|
||||
protected function convertBools($candidate){
|
||||
if (is_bool($candidate)){
|
||||
return $candidate? "true" : "false";
|
||||
}
|
||||
return $candidate;
|
||||
}
|
||||
|
||||
protected function call($function, array $arguments = array(), $method = 'GET'){
|
||||
$arguments['apikey'] = $this->apiKey;
|
||||
$arguments = array_map(array($this, 'convertBools'), $arguments);
|
||||
$arguments = http_build_query($arguments, '', '&');
|
||||
$url = $this->baseUrl."/".self::API_VERSION."/".$function;
|
||||
if ($method !== 'POST'){
|
||||
$url .= "?".$arguments;
|
||||
}
|
||||
// use curl of it's available
|
||||
if (function_exists('curl_init')){
|
||||
$c = curl_init($url);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($c, CURLOPT_TIMEOUT, 20);
|
||||
if ($method === 'POST'){
|
||||
curl_setopt($c, CURLOPT_POST, true);
|
||||
curl_setopt($c, CURLOPT_POSTFIELDS, $arguments);
|
||||
}
|
||||
$result = curl_exec($c);
|
||||
curl_close($c);
|
||||
// fallback to plain php
|
||||
} else {
|
||||
$params = array('http' => array('method' => $method, 'ignore_errors' => true, 'header' => 'Content-Type:application/x-www-form-urlencoded'));
|
||||
if ($method === 'POST'){
|
||||
$params['http']['content'] = $arguments;
|
||||
}
|
||||
$context = stream_context_create($params);
|
||||
$fp = fopen($url, 'rb', false, $context);
|
||||
$result = $fp ? stream_get_contents($fp) : null;
|
||||
}
|
||||
|
||||
if(!$result){
|
||||
throw new \UnexpectedValueException("Empty or No Response from the server");
|
||||
}
|
||||
|
||||
$result = json_decode($result);
|
||||
if ($result === null){
|
||||
throw new \UnexpectedValueException("JSON response could not be decoded");
|
||||
}
|
||||
return $this->handleResult($result);
|
||||
}
|
||||
|
||||
protected function handleResult($result){
|
||||
if (!isset($result->code)){
|
||||
throw new \RuntimeException("API response has no code");
|
||||
}
|
||||
if (!isset($result->message)){
|
||||
throw new \RuntimeException("API response has no message");
|
||||
}
|
||||
if (!isset($result->data)){
|
||||
$result->data = null;
|
||||
}
|
||||
|
||||
switch ($result->code){
|
||||
case self::CODE_OK:
|
||||
return $result->data;
|
||||
case self::CODE_INVALID_PARAMETERS:
|
||||
case self::CODE_INVALID_API_KEY:
|
||||
throw new \InvalidArgumentException($result->message);
|
||||
case self::CODE_INTERNAL_ERROR:
|
||||
throw new \RuntimeException($result->message);
|
||||
case self::CODE_INVALID_FUNCTION:
|
||||
throw new \BadFunctionCallException($result->message);
|
||||
default:
|
||||
throw new \RuntimeException("An unexpected error occurred whilst handling the response");
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
foreach($methods as $method){
|
||||
render(__DIR__.'/method.php', $method);
|
||||
}
|
||||
?>
|
||||
|
||||
}
|
||||
|
31
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/tools/templates/method.php
vendored
Executable file
31
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/tools/templates/method.php
vendored
Executable file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
$arglist = implode(", ", array_map(function($arg){
|
||||
// Optional arg
|
||||
if ($arg[0] == '['){
|
||||
$arg = trim($arg, "[]");
|
||||
$arg = "{$arg} = null";
|
||||
}
|
||||
return '$'.$arg;
|
||||
}, $args));
|
||||
|
||||
|
||||
echo " // {$name}\n";
|
||||
echo " public function {$name}({$arglist}){\n";
|
||||
echo " \$params = array();\n\n";
|
||||
|
||||
// Optional arg
|
||||
foreach ($args as $arg){
|
||||
if ($arg[0] == '['){
|
||||
$arg = trim($arg, "[]");
|
||||
echo " if (isset(\${$arg})){\n";
|
||||
echo " \$params['{$arg}'] = \${$arg};\n";
|
||||
echo " }\n";
|
||||
} else {
|
||||
echo " \$params['{$arg}'] = \${$arg};\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
echo " return \$this->{$httpMethod}(\"{$name}\", \$params);\n";
|
||||
echo " }\n\n";
|
||||
?>
|
1
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/tools/testcontainer/APIKEY.txt
vendored
Executable file
1
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/tools/testcontainer/APIKEY.txt
vendored
Executable file
|
@ -0,0 +1 @@
|
|||
dcf118bfc58cc69cdf3ae870071f97149924f5f5a9a4a552fd2921b40830aaae
|
13
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/tools/testcontainer/Dockerfile
vendored
Executable file
13
docker/nextcloud/custom_apps/ownpad/3rdparty/tomnomnom/etherpad-lite-client/tools/testcontainer/Dockerfile
vendored
Executable file
|
@ -0,0 +1,13 @@
|
|||
FROM ubuntu
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y gzip git curl python libssl-dev pkg-config build-essential
|
||||
RUN apt-get install -y nodejs npm
|
||||
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
||||
RUN git clone git://github.com/ether/etherpad-lite.git
|
||||
|
||||
COPY APIKEY.txt /etherpad-lite/
|
||||
|
||||
EXPOSE 9001
|
||||
|
||||
ENTRYPOINT ["/etherpad-lite/bin/run.sh", "--root"]
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
sudo docker run --detach --publish=9001:9001 $1
|
|
@ -0,0 +1,117 @@
|
|||
Ownpad (0.6.16):
|
||||
* **Fix**: Add Nextcloud 21 compatibility.
|
||||
|
||||
Ownpad (0.6.15):
|
||||
* **Fix**: Add Nextcloud 19 compatibility (no changes; thanks @sim6).
|
||||
|
||||
Ownpad (0.6.14):
|
||||
* **Fix**: Add Nextcloud 17 & 18 compatibility (no changes)
|
||||
|
||||
Ownpad (0.6.13):
|
||||
* **Fix**: Add Nextcloud 16 compatibility (no changes)
|
||||
|
||||
Ownpad (0.6.12):
|
||||
* **Fix**: fix regexp used to enable protected pads by removing trailing slash from EPL hostname.
|
||||
|
||||
Ownpad (0.6.11):
|
||||
* **Fix**: fix public pad creation if Etherpad API is not used.
|
||||
|
||||
Ownpad (0.6.10):
|
||||
* **Enhancement**: ownpad should work fine with Nextcloud 15.
|
||||
|
||||
Ownpad (0.6.9):
|
||||
* **Enhancement**: use API to create unprotected pads (thanks @m0urs).
|
||||
* **Fix**: remove deprecated method `getMediumStrengthGenerator` (thanks @rullzer).
|
||||
* **Fix**: only use lower case in pad and calc names to prevent an issue with Ethercalc (thanks @dtygel)
|
||||
* **Fix**: update `README.md` to make more explicit that this app is no more than doing links to Etherpad/Ethercalc.
|
||||
|
||||
Ownpad (0.6.8):
|
||||
* **Fix**: update previous fix to let Ownpad be also compatible with NC 13.
|
||||
|
||||
Ownpad (0.6.7):
|
||||
* **Enhancement**: remove deprecated code calls and let Ownpad be compatible with Nextcloud 14.
|
||||
|
||||
Ownpad (0.6.6):
|
||||
* **Enhancement**: add option to disable non-protected 'public' pads.
|
||||
* **Enhancement**: use proper icons of etherpad-lite and ethercalc.
|
||||
|
||||
Ownpad (0.6.5):
|
||||
* **Bugfix**: fix UI with Nextcloud 13 (thanks @frissdiegurke).
|
||||
* **Enhancement**: enhance settings page.
|
||||
|
||||
Ownpad (0.6.4):
|
||||
* **Bugfix**: fix protected pads (thanks @frissdiegurke).
|
||||
* **Enhancement**: replace ownCloud by Nextcloud.
|
||||
|
||||
Ownpad (0.6.3):
|
||||
* **Enhancement**: move application to the `office` section on Nextcloud app store.
|
||||
* **Bugfix**: update message displayed when pad/calc URL doesn’t match configuration.
|
||||
* **Bugfix**: when applying migration, don’t forget to check version…
|
||||
|
||||
Ownpad (0.6.2):
|
||||
* **Enhancement**: make app compatible with Nextcloud 13 (and drop ownCloud support).
|
||||
* **Enhancement**: finish code refactoring (`app.php` moved to `Application` class).
|
||||
* **Bugfix**: don’t forget to load JavaScript code on the settings page.
|
||||
|
||||
Ownpad (0.6.1):
|
||||
* **Enhancement**: move internal logic to a new OwnpadService class.
|
||||
* **Bugfix**: fix regression introduced in previous version (bb3f3199c44d35b21a45d1ae6dd5524853f401cf).
|
||||
|
||||
Ownpad (0.6.0):
|
||||
* **Enhancement**: support for Etherpad API (experimental, incomplete and probably not totally secure) which allows to create private pads.
|
||||
* **Enhancement**: refactor app to use AppFramework.
|
||||
* **Bugfix**: remove deprecated code (thanks @MorrisJobke!).
|
||||
|
||||
Ownpad (0.5.10)
|
||||
* **Bugfix**: fix HTML code in template settings (thanks to KTim21).
|
||||
* **Bugfix**: change Etherpad/Ethercalc instances hints on the configuration page.
|
||||
* **Bugfix**: fix “multisheet support” for Ethercalc.
|
||||
* **Bugfix**: fix Ethercalc URL validation.
|
||||
* **Bugfix**: fix HTML code in the `noviewer.php` template.
|
||||
|
||||
Ownpad (0.5.9)
|
||||
* **Enhancement**: check for valid URL in pads/calcs to prevent bad redirections (thanks to Stephan Wiefling).
|
||||
* **Enhancement**: make Ownpad compatible with Nextcloud 12.
|
||||
* **Enhancement**: update documentation.
|
||||
|
||||
Ownpad (0.5.8)
|
||||
* **Enhancement**: enable multisheet support for new Ethercalc.
|
||||
* **Enhancement**: update Content-Security-Policy rules.
|
||||
|
||||
Ownpad (0.5.6)
|
||||
* **Enhancement**: make Ownpad compatible with Nextcloud 11.
|
||||
* **Bugfix**: don’t call for Ownpad configuration on public pages (fixes page reload on public pages)
|
||||
|
||||
Ownpad (0.5.4)
|
||||
* **Bugfix**: fix info.xml format for Nextcloud appstore.
|
||||
|
||||
Ownpad (0.5.3)
|
||||
* **Enhancement**: add icon for Etherpad in the “+” menu.
|
||||
* **Enhancement**: some minor code enhacements.
|
||||
* **Bugfix**: fix upgrade code (issue was introduced in 6560a6adf1b5027dfb70c0df6eff527f4d2304f2).
|
||||
|
||||
Ownpad (0.5.2)
|
||||
* **Enhancement**: don’t display pad/calc if no URL is configured for Ownpad.
|
||||
* **Enhancement**: some minor changes (typo, etc.)
|
||||
* **Enhancement**: minor changes to the configuration page.
|
||||
|
||||
Ownpad (0.5.1)
|
||||
* **Bugfix**: disable Ownpad’s mimetypes registration at application level, to prevent breaking all other mimetypes. This requires to manually add mimetypes to ownCloud’s configuration (see README.md).
|
||||
|
||||
Ownpad (0.5.0)
|
||||
* **Bugfix**: fix portability to ownCloud 9.
|
||||
|
||||
Ownpad (0.4.0)
|
||||
* **Enhancement**: port code to ownCloud 9
|
||||
|
||||
Ownpad (0.3.0)
|
||||
**Bugfix**: Add Content-Security-Policy rules in order to allow the pad/calc iframe to be opened (required by ownCloud 8.1).
|
||||
**Bugfix**: Fix the way URL are encoded to make Etherpad happy.
|
||||
**Bugfix**: Fix the pad’s viewer size
|
||||
|
||||
Ownpad (0.2.0)
|
||||
* **Enhancement**: New pads/calcs are now handled by a specific AJAX script (`ajax/newpad.php`) that manage the file content.
|
||||
* **Enhancement**: Autosave items in configuration page, and add a confirmation message (inspired by the `news` app).
|
||||
|
||||
Ownpad (0.1.0)
|
||||
* First release
|
|
@ -0,0 +1,661 @@
|
|||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
|
@ -0,0 +1,90 @@
|
|||
# Ownpad — Etherpad and Ethercalc _links_ in Nextcloud
|
||||
|
||||
Ownpad is a Nextcloud application that allows to create and open
|
||||
Etherpad and Ethercalc documents. This application requires to have
|
||||
access to an instance of Etherpad and/or Ethercalc to work properly.
|
||||
|
||||
Note that the documents are only stored with your Etherpad/Ethercalc
|
||||
service provider; no copy is kept on Nextcloud. As documents are
|
||||
created this way Nextcloud is not responsible for the documents
|
||||
security, e.g. anyone with access to the Etherpad/Ethercalc service
|
||||
can access your documents.
|
||||
|
||||
## Configuration
|
||||
|
||||
In order to make Ownpad work, go to the configuration panel (Settings /
|
||||
Admininstration / Additional Settings) and fill in the necessary data
|
||||
within the “Ownpad (collaborative documents)” section.
|
||||
|
||||
**Set a Etherpad Host:**
|
||||
To be able to process the document, you must configure a Host. [Find more public providers at the Etherpad-Lite wiki](https://github.com/ether/etherpad-lite/wiki/Sites-that-run-Etherpad-Lite)
|
||||
|
||||
*Example:*
|
||||
* Etherpad Host https://etherpad.wikimedia.org/
|
||||
* Ethercalc Host https://ethercalc.org/
|
||||
|
||||
Note that most browsers will only display the content if both Nextcloud and Etherpad/Ethercalc are served via HTTPS.
|
||||
|
||||
Afterwards, the “pad” and/or “calc” items will be available in the “+”
|
||||
menu from the “File” app.
|
||||
|
||||
## Mimetype detection
|
||||
|
||||
Unfortunately, apps can’t declare new mimetypes on the fly. To make
|
||||
Ownpad work properly, you need to add two new mimetypes in the
|
||||
`mimetypemapping.json` file (at Nextcloud level).
|
||||
|
||||
To proceed, just copy `/resources/config/mimetypemapping.dist.json` to
|
||||
`/config/mimetypemapping.json` (in the `config/` folder at Nextcloud’s
|
||||
root directory; the file should be stored next to the `config.php`
|
||||
file).
|
||||
|
||||
For the [snap-distribution of Nextcloud](https://github.com/nextcloud/nextcloud-snap) the template file can be found under `/snap/nextcloud/current/htdocs/resources/config/mimetypemapping.dist.json` and the active config-folder by default is `/var/snap/nextcloud/current/nextcloud/config/`.
|
||||
|
||||
Afterwards add the two following lines just after the “_comment”
|
||||
lines.
|
||||
|
||||
"pad": ["application/x-ownpad"],
|
||||
"calc": ["application/x-ownpad"],
|
||||
|
||||
If all other mimetypes are not working properly, just run the
|
||||
following command:
|
||||
|
||||
sudo -u www-data php occ files:scan --all
|
||||
|
||||
For the snap-distribution that is
|
||||
|
||||
sudo nextcloud.occ files:scan --all
|
||||
|
||||
## Create access restricted pads
|
||||
|
||||
Ownpad supports communication with the Etherpad API for access
|
||||
restriction (so called *protected pads*). This support is considered
|
||||
**experimental** due to work in progress; some features are still
|
||||
missing. See the [TODO.md](TODO.md) for details.
|
||||
|
||||
Protected pads need to be accessed via Nextcloud in order to gain access
|
||||
privileges.
|
||||
|
||||
In order for this to work, you’ll need to enter your Etherpad API key
|
||||
within the Ownpad settings. You can find your API key in the
|
||||
`APIKEY.txt` file of your Etherpad instance.
|
||||
|
||||
In addition you’ll need to host your Etherpad and Nextcloud instances
|
||||
under the same domain. For example, you can host your Etherpad in
|
||||
`pad.example.org` and your Nextcloud in `cloud.example.org`. For this
|
||||
example, you’ll have to set the cookie domain to `example.org` within
|
||||
the Ownpad settings.
|
||||
|
||||
If you want to create *truly* private pads, you have to dedicate an
|
||||
Etherpad instance for Nextcloud **running both with HTTPS**. You will then configure Etherpad to
|
||||
restrict pad access via sessions and pad creation via the API.
|
||||
For this, you have to adjust your Etherpad configuration file
|
||||
(`settings.json`) as following:
|
||||
|
||||
"requireSession" : true,
|
||||
"editOnly" : true,
|
||||
|
||||
## License
|
||||
|
||||
The code is licensed under the AGPLv3 which can be found as the file [COPYING](COPYING) in the source code repository.
|
|
@ -0,0 +1,27 @@
|
|||
# Todo list
|
||||
|
||||
- [x] Add basic support for Etherpad API (create & open pads).
|
||||
- [ ] Check rights before opening the file (mainly, respect rights if
|
||||
share doesn’t allow modifications).
|
||||
- [ ] Make configuration more user-friendly (maybe, automatically find
|
||||
the most correct cookie domain to use). Maybe also add a new
|
||||
configuration item to mark that Etherpad API is usable (after
|
||||
test).
|
||||
- [ ] Try to find a way to work-around the cookie issue (that may
|
||||
require to develop a tiny plugin for Etherpad that would allow
|
||||
to set the cookie for us). This
|
||||
[plugin](https://www.npmjs.com/package/ep_auth_session) exists,
|
||||
we could add an option to support it.
|
||||
- [ ] Handle errors and exceptions.
|
||||
- [ ] Handle session timeouts (we ask for 3600 seconds session to
|
||||
Etherpad, but we are using a session cookie).
|
||||
- [ ] Handle ACL revocation (add some kind of hook on ACL changes, and
|
||||
re-validate / check all sessions for that specific pad(s))
|
||||
- [ ] Manage multiple ownCloud instances for Etherpad (when calling
|
||||
`createAuthorIfNotExistsFor`).
|
||||
- [ ] Manage multiple sessions for Etherpad (you can add multiple
|
||||
sessions to the `sessionID` cookie by separating them by
|
||||
commas).
|
||||
- [ ] Cleanup `sessionID` cookie after logout (a bit tricky, requires
|
||||
to save the current `sessionID` somewhere and remove it after
|
||||
user logs out).
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* Nextcloud - Ownpad
|
||||
*
|
||||
* This file is licensed under the Affero General Public License
|
||||
* version 3 or later. See the COPYING file.
|
||||
*
|
||||
* @author Olivier Tétard <olivier.tetard@miskin.fr>
|
||||
* @copyright Olivier Tétard <olivier.tetard@miskin.fr>, 2017
|
||||
*/
|
||||
|
||||
namespace OCA\Ownpad\AppInfo;
|
||||
|
||||
require_once __DIR__ . '/../3rdparty/autoload.php';
|
||||
|
||||
$app = new Application();
|
||||
$app->registerHooks();
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0"?>
|
||||
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
|
||||
<id>ownpad</id>
|
||||
<name>Ownpad</name>
|
||||
<summary>
|
||||
Create and open Etherpad and Ethercalc documents.
|
||||
</summary>
|
||||
<description>
|
||||
Ownpad is a Nextcloud application that allows to create and open
|
||||
Etherpad and Ethercalc documents.
|
||||
|
||||
This application requires to have access to an instance of
|
||||
Etherpad and/or Ethercalc to work properly.
|
||||
</description>
|
||||
<version>0.6.16</version>
|
||||
<licence>agpl</licence>
|
||||
<author mail="olivier.tetard@miskin.fr">Olivier Tétard</author>
|
||||
<documentation>
|
||||
<user>https://github.com/otetard/ownpad/blob/master/README.md#mimetype-detection</user>
|
||||
</documentation>
|
||||
<category>office</category>
|
||||
<bugs>https://github.com/otetard/ownpad/issues</bugs>
|
||||
<repository>https://github.com/otetard/ownpad</repository>
|
||||
<screenshot small-thumbnail="https://raw.githubusercontent.com/otetard/ownpad/master/screenshots/1-small.png">https://raw.githubusercontent.com/otetard/ownpad/master/screenshots/1.png</screenshot>
|
||||
<dependencies>
|
||||
<nextcloud min-version="19" max-version="21" />
|
||||
</dependencies>
|
||||
<repair-steps>
|
||||
<post-migration>
|
||||
<step>OCA\Ownpad\Migration\MigrateSettings</step>
|
||||
<step>OCA\Ownpad\Migration\ConfigPublicEnable</step>
|
||||
</post-migration>
|
||||
</repair-steps>
|
||||
<settings>
|
||||
<admin>OCA\Ownpad\Settings\AdminSettings</admin>
|
||||
</settings>
|
||||
<ocsid>174679</ocsid>
|
||||
</info>
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
* Nextcloud - Ownpad
|
||||
*
|
||||
* This file is licensed under the Affero General Public License
|
||||
* version 3 or later. See the COPYING file.
|
||||
*
|
||||
* @author Olivier Tétard <olivier.tetard@miskin.fr>
|
||||
* @copyright Olivier Tétard <olivier.tetard@miskin.fr>, 2017
|
||||
*/
|
||||
|
||||
namespace OCA\Ownpad\Appinfo;
|
||||
|
||||
/** @var $this \OC\Route\Router */
|
||||
|
||||
$this->create('ownpad_newpad', 'ajax/newpad.php')->actionInclude('ownpad/ajax/newpad.php');
|
||||
|
||||
return ['routes' => [
|
||||
['name' => 'display#showPad', 'url' => '/', 'verb' => 'GET'],
|
||||
['name' => 'ajax#getconfig', 'url' => '/ajax/v1.0/getconfig', 'verb' => 'GET'],
|
||||
['name' => 'ajax#newpad', 'url' => '/ajax/v1.0/newpad', 'verb' => 'POST'],
|
||||
]];
|
|
@ -0,0 +1,54 @@
|
|||
/**
|
||||
* Nextcloud - Ownpad
|
||||
*
|
||||
* This file is licensed under the Affero General Public License
|
||||
* version 3 or later. See the COPYING file.
|
||||
*
|
||||
* @author Olivier Tétard <olivier.tetard@miskin.fr>
|
||||
* @copyright Olivier Tétard <olivier.tetard@miskin.fr>, 2017
|
||||
*/
|
||||
|
||||
#ownpad_bar {
|
||||
background: #333;
|
||||
color: #999;
|
||||
min-height: 25px;
|
||||
padding: 6px 6px 6px 10px;
|
||||
}
|
||||
#ownpad_bar span {
|
||||
opacity: 0;
|
||||
transition: all 1s ease;
|
||||
-o-transition: all 1s ease;
|
||||
-moz-transition: all 1s ease;
|
||||
-webkit-transition: all 1s ease;
|
||||
}
|
||||
#ownpad_bar:hover span {
|
||||
opacity: 1;
|
||||
}
|
||||
#ownpad_bar a,#ownpad_bar strong {
|
||||
color: #CCC;
|
||||
}
|
||||
#ownpad_close {
|
||||
display: inline-block;
|
||||
padding: 0 10px;
|
||||
height: 20px;
|
||||
background: #900;
|
||||
color: #F5F5F5;
|
||||
border-radius: 3px;
|
||||
border: #C00 1px solid;
|
||||
font-weight: 900;
|
||||
float: right;
|
||||
}
|
||||
#ownpad_close:hover {
|
||||
background: #C00;
|
||||
color: #FFF;
|
||||
border: #F00 1px solid;
|
||||
}
|
||||
|
||||
.icon-filetype-etherpad {
|
||||
background-image: url("../img/etherpad-lite.ico");
|
||||
background-size: 16px;
|
||||
}
|
||||
.icon-filetype-ethercalc {
|
||||
background-image: url("../img/ethercalc.ico");
|
||||
background-size: 16px;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* Nextcloud - Ownpad
|
||||
*
|
||||
* This file is licensed under the Affero General Public License
|
||||
* version 3 or later. See the COPYING file.
|
||||
*
|
||||
* @author Olivier Tétard <olivier.tetard@miskin.fr>
|
||||
* @copyright Olivier Tétard <olivier.tetard@miskin.fr>, 2017
|
||||
*/
|
||||
|
||||
#ownpad-saved-message {
|
||||
margin: 15px 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#ownpad .indent {
|
||||
padding-left: 28px;
|
||||
}
|
||||
|
||||
#ownpad .double-indent {
|
||||
padding-left: 56px;
|
||||
}
|
||||
|
||||
input#ownpad_etherpad_host,
|
||||
input#ownpad_ethercalc_host,
|
||||
input#ownpad_etherpad_apikey,
|
||||
input#ownpad_etherpad_cookie_domain
|
||||
{
|
||||
width: 300px;
|
||||
}
|
|
@ -0,0 +1,911 @@
|
|||
Files: ethercalc.ico
|
||||
|
||||
SOCIALCALC LICENSE.txt FILE:
|
||||
|
||||
=========================================
|
||||
ABOUT THIS FILE
|
||||
=========================================
|
||||
|
||||
This file includes copies of the Common Public Attribution License (CPAL) and
|
||||
the Artistic License 2.0.
|
||||
|
||||
This product consists of components licensed under different licenses.
|
||||
Check the contents of each file for a statement of the license for that file.
|
||||
Files without license information are licensed under the Artistic License 2.0.
|
||||
|
||||
======================================================
|
||||
COMMON PUBLIC ATTRIBUTION LICENSE VERSION 1.0 (CPAL)
|
||||
======================================================
|
||||
|
||||
Common Public Attribution License Version 1.0 (CPAL)
|
||||
|
||||
1. "Definitions"
|
||||
|
||||
1.0.1 "Commercial Use" means distribution or otherwise making the Covered Code
|
||||
available to a third party.
|
||||
|
||||
1.1 "Contributor" means each entity that creates or contributes to the creation
|
||||
of Modifications.
|
||||
|
||||
1.2 "Contributor Version" means the combination of the Original Code, prior
|
||||
Modifications used by a Contributor, and the Modifications made by that particular
|
||||
Contributor.
|
||||
|
||||
1.3 "Covered Code" means the Original Code or Modifications or the combination of
|
||||
the Original Code and Modifications, in each case including portions thereof.
|
||||
|
||||
1.4 "Electronic Distribution Mechanism" means a mechanism generally accepted in
|
||||
the software development community for the electronic transfer of data.
|
||||
|
||||
1.5 "Executable" means Covered Code in any form other than Source Code.
|
||||
|
||||
1.6 "Initial Developer" means the individual or entity identified as the Initial
|
||||
Developer in the Source Code notice required by Exhibit A.
|
||||
|
||||
1.7 "Larger Work" means a work which combines Covered Code or portions thereof with
|
||||
code not governed by the terms of this License.
|
||||
|
||||
1.8 "License" means this document.
|
||||
|
||||
1.8.1 "Licensable" means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently acquired, any and all of
|
||||
the rights conveyed herein.
|
||||
|
||||
1.9 "Modifications" means any addition to or deletion from the substance or structure
|
||||
of either the Original Code or any previous Modifications. When Covered Code is
|
||||
released as a series of files, a Modification is:
|
||||
|
||||
A. Any addition to or deletion from the contents of a file containing Original Code
|
||||
or previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or previous Modifications.
|
||||
|
||||
1.10 "Original Code" means Source Code of computer software code which is described in
|
||||
the Source Code notice required by Exhibit A as Original Code, and which, at the time
|
||||
of its release under this License is not already Covered Code governed by this License.
|
||||
|
||||
1.10.1 "Patent Claims" means any patent claim(s), now owned or hereafter acquired,
|
||||
including without limitation, method, process, and apparatus claims, in any patent
|
||||
Licensable by grantor.
|
||||
|
||||
1.11 "Source Code" means the preferred form of the Covered Code for making modifications
|
||||
to it, including all modules it contains, plus any associated interface definition files,
|
||||
scripts used to control compilation and installation of an Executable, or source code
|
||||
differential comparisons against either the Original Code or another well known,
|
||||
available Covered Code of the Contributor’s choice. The Source Code can be in a compressed
|
||||
or archival form, provided the appropriate decompression or de-archiving software is
|
||||
widely available for no charge.
|
||||
|
||||
1.12 "You" (or "Your") means an individual or a legal entity exercising rights under, and
|
||||
complying with all of the terms of, this License or a future version of this License
|
||||
issued under Section 6.1. For legal entities, "You" includes any entity which controls,
|
||||
is controlled by, or is under common control with You. For purposes of this definition,
|
||||
"control" means (a) the power, direct or indirect, to cause the direction or management
|
||||
of such entity, whether by contract or otherwise, or (b) ownership of more than fifty
|
||||
percent (50%) of the outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
2. Source Code License.
|
||||
|
||||
2.1 The Initial Developer Grant.
|
||||
|
||||
The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive
|
||||
license, subject to third party intellectual property claims:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark) Licensable by
|
||||
Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute
|
||||
the Original Code (or portions thereof) with or without Modifications, and/or as part
|
||||
of a Larger Work; and
|
||||
|
||||
(b) under Patents Claims infringed by the making, using or selling of Original Code, to
|
||||
make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of
|
||||
the Original Code (or portions thereof).
|
||||
|
||||
(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date
|
||||
Initial Developer first distributes Original Code under the terms of this License.
|
||||
|
||||
(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code
|
||||
that You delete from the Original Code; 2) separate from the Original Code; or 3) for
|
||||
infringements caused by: i) the modification of the Original Code or ii) the combination
|
||||
of the Original Code with other software or devices.
|
||||
|
||||
2.2 Contributor Grant.
|
||||
|
||||
Subject to third party intellectual property claims, each Contributor hereby grants You
|
||||
a world-wide, royalty-free, non-exclusive license
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark) Licensable by
|
||||
Contributor, to use, reproduce, modify, display, perform, sublicense and distribute
|
||||
the Modifications created by such Contributor (or portions thereof) either on an
|
||||
unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger
|
||||
Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using, or selling of Modifications
|
||||
made by that Contributor either alone and/or in combination with its Contributor
|
||||
Version (or portions of such combination), to make, use, sell, offer for sale, have
|
||||
made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or
|
||||
portions thereof); and 2) the combination of Modifications made by that Contributor
|
||||
with its Contributor Version (or portions of such combination).
|
||||
|
||||
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date
|
||||
Contributor first makes Commercial Use of the Covered Code.
|
||||
|
||||
(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code
|
||||
that Contributor has deleted from the Contributor Version; 2) separate from the
|
||||
Contributor Version; 3) for infringements caused by: i) third party modifications of
|
||||
Contributor Version or ii) the combination of Modifications made by that Contributor
|
||||
with other software (except as part of the Contributor Version) or other devices; or
|
||||
4) under Patent Claims infringed by Covered Code in the absence of Modifications made
|
||||
by that Contributor.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1 Application of License.
|
||||
|
||||
The Modifications which You create or to which You contribute are governed by the terms
|
||||
of this License, including without limitation Section 2.2. The Source Code version of
|
||||
Covered Code may be distributed only under the terms of this License or a future version
|
||||
of this License released under Section 6.1, and You must include a copy of this License
|
||||
with every copy of the Source Code You distribute. You may not offer or impose any terms
|
||||
on any Source Code version that alters or restricts the applicable version of this License
|
||||
or the recipients’ rights hereunder. However, You may include an additional document
|
||||
offering the additional rights described in Section 3.5.
|
||||
|
||||
3.2 Availability of Source Code.
|
||||
|
||||
Any Modification which You create or to which You contribute must be made available in
|
||||
Source Code form under the terms of this License either on the same media as an Executable
|
||||
version or via an accepted Electronic Distribution Mechanism to anyone to whom you made
|
||||
an Executable version available; and if made available via Electronic Distribution
|
||||
Mechanism, must remain available for at least twelve (12) months after the date it
|
||||
initially became available, or at least six (6) months after a subsequent version of that
|
||||
particular Modification has been made available to such recipients. You are responsible
|
||||
for ensuring that the Source Code version remains available even if the Electronic
|
||||
Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3 Description of Modifications.
|
||||
|
||||
You must cause all Covered Code to which You contribute to contain a file documenting the
|
||||
changes You made to create that Covered Code and the date of any change. You must include
|
||||
a prominent statement that the Modification is derived, directly or indirectly, from
|
||||
Original Code provided by the Initial Developer and including the name of the Initial
|
||||
Developer in (a) the Source Code, and (b) in any notice in an Executable version or
|
||||
related documentation in which You describe the origin or ownership of the Covered Code.
|
||||
|
||||
3.4 Intellectual Property Matters
|
||||
|
||||
(a) Third Party Claims.
|
||||
|
||||
If Contributor has knowledge that a license under a third party’s intellectual property
|
||||
rights is required to exercise the rights granted by such Contributor under Sections 2.1
|
||||
or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL"
|
||||
which describes the claim and the party making the claim in sufficient detail that a
|
||||
recipient will know whom to contact. If Contributor obtains such knowledge after the
|
||||
Modification is made available as described in Section 3.2, Contributor shall promptly
|
||||
modify the LEGAL file in all copies Contributor makes available thereafter and shall take
|
||||
other steps (such as notifying appropriate mailing lists or newsgroups) reasonably
|
||||
calculated to inform those who received the Covered Code that new knowledge has been obtained.
|
||||
|
||||
(b) Contributor APIs.
|
||||
|
||||
If Contributor’s Modifications include an application programming interface and Contributor
|
||||
has knowledge of patent licenses which are reasonably necessary to implement that API,
|
||||
Contributor must also include this information in the LEGAL file.
|
||||
|
||||
(c) Representations.
|
||||
|
||||
Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor
|
||||
believes that Contributor’s Modifications are Contributor’s original creation(s) and/or
|
||||
Contributor has sufficient rights to grant the rights conveyed by this License.
|
||||
|
||||
3.5 Required Notices.
|
||||
|
||||
You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not
|
||||
possible to put such notice in a particular Source Code file due to its structure, then
|
||||
You must include such notice in a location (such as a relevant directory) where a user
|
||||
would be likely to look for such a notice. If You created one or more Modification(s)
|
||||
You may add your name as a Contributor to the notice described in Exhibit A. You must
|
||||
also duplicate this License in any documentation for the Source Code where You describe
|
||||
recipients’ rights or ownership rights relating to Covered Code. You may choose to offer,
|
||||
and to charge a fee for, warranty, support, indemnity or liability obligations to one or
|
||||
more recipients of Covered Code. However, You may do so only on Your own behalf, and not
|
||||
on behalf of the Initial Developer or any Contributor. You must make it absolutely clear
|
||||
than any such warranty, support, indemnity or liability obligation is offered by You alone,
|
||||
and You hereby agree to indemnify the Initial Developer and every Contributor for any
|
||||
liability incurred by the Initial Developer or such Contributor as a result of warranty,
|
||||
support, indemnity or liability terms You offer.
|
||||
|
||||
3.6 Distribution of Executable Versions.
|
||||
|
||||
You may distribute Covered Code in Executable form only if the requirements of Section
|
||||
3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the
|
||||
Source Code version of the Covered Code is available under the terms of this License,
|
||||
including a description of how and where You have fulfilled the obligations of Section
|
||||
3.2. The notice must be conspicuously included in any notice in an Executable version,
|
||||
related documentation or collateral in which You describe recipients’ rights relating to
|
||||
the Covered Code. You may distribute the Executable version of Covered Code or ownership
|
||||
rights under a license of Your choice, which may contain terms different from this License,
|
||||
provided that You are in compliance with the terms of this License and that the license for
|
||||
the Executable version does not attempt to limit or alter the recipient’s rights in the
|
||||
Source Code version from the rights set forth in this License. If You distribute the
|
||||
Executable version under a different license You must make it absolutely clear that any
|
||||
terms which differ from this License are offered by You alone, not by the Initial Developer,
|
||||
Original Developer or any Contributor. You hereby agree to indemnify the Initial Developer,
|
||||
Original Developer and every Contributor for any liability incurred by the Initial Developer,
|
||||
Original Developer or such Contributor as a result of any such terms You offer.
|
||||
|
||||
3.7 Larger Works.
|
||||
|
||||
You may create a Larger Work by combining Covered Code with other code not governed by the
|
||||
terms of this License and distribute the Larger Work as a single product. In such a case, You
|
||||
must make sure the requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this License with respect to
|
||||
some or all of the Covered Code due to statute, judicial order, or regulation then You must:
|
||||
(a) comply with the terms of this License to the maximum extent possible; and (b) describe the
|
||||
limitations and the code they affect. Such description must be included in the LEGAL file
|
||||
described in Section 3.4 and must be included with all distributions of the Source Code.
|
||||
Except to the extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Application of this License.
|
||||
|
||||
This License applies to code to which the Initial Developer has attached the notice in Exhibit
|
||||
A and to related Covered Code.
|
||||
|
||||
6. Versions of the License.
|
||||
|
||||
6.1 New Versions.
|
||||
|
||||
Socialtext, Inc. ("Socialtext") may publish revised and/or new versions of the License from
|
||||
time to time. Each version will be given a distinguishing version number.
|
||||
|
||||
6.2 Effect of New Versions.
|
||||
|
||||
Once Covered Code has been published under a particular version of the License, You may always
|
||||
continue to use it under the terms of that version. You may also choose to use such Covered
|
||||
Code under the terms of any subsequent version of the License published by Socialtext. No one
|
||||
other than Socialtext has the right to modify the terms applicable to Covered Code created
|
||||
under this License.
|
||||
|
||||
6.3 Derivative Works.
|
||||
|
||||
If You create or use a modified version of this License (which you may only do in order to
|
||||
apply it to code which is not already Covered Code governed by this License), You must (a)
|
||||
rename Your license so that the phrases "Socialtext", "CPAL" or any confusingly similar phrase
|
||||
do not appear in your license (except to note that your license differs from this License) and
|
||||
(b) otherwise make it clear that Your version of the license contains terms which differ from
|
||||
the CPAL. (Filling in the name of the Initial Developer, Original Developer, Original Code or
|
||||
Contributor in the notice described in Exhibit A shall not of themselves be deemed to be
|
||||
modifications of this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND,
|
||||
EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS
|
||||
FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK
|
||||
AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE
|
||||
DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER, ORIGINAL DEVELOPER OR ANY OTHER
|
||||
CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
||||
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS
|
||||
AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
8. TERMINATION.
|
||||
|
||||
8.1 This License and the rights granted hereunder will terminate automatically if You fail to
|
||||
comply with terms herein and fail to cure such breach within 30 days of becoming aware of the
|
||||
breach. All sublicenses to the Covered Code which are properly granted shall survive any
|
||||
termination of this License. Provisions which, by their nature, must remain in effect beyond
|
||||
the termination of this License shall survive.
|
||||
|
||||
8.2 If You initiate litigation by asserting a patent infringement claim (excluding declatory
|
||||
judgment actions) against Initial Developer, Original Developer or a Contributor (the Initial
|
||||
Developer, Original Developer or Contributor against whom You file such action is referred to
|
||||
as "Participant") alleging that:
|
||||
|
||||
(a) such Participant’s Contributor Version directly or indirectly infringes any patent, then
|
||||
any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this
|
||||
License shall, upon 60 days notice from Participant terminate prospectively, unless if within
|
||||
60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually
|
||||
agreeable reasonable royalty for Your past and future use of Modifications made by such
|
||||
Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version
|
||||
against such Participant. If within 60 days of notice, a reasonable royalty and payment
|
||||
arrangement are not mutually agreed upon in writing by the parties or the litigation claim is
|
||||
not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2
|
||||
automatically terminate at the expiration of the 60 day notice period specified above.
|
||||
|
||||
(b) any software, hardware, or device, other than such Participant’s Contributor Version,
|
||||
directly or indirectly infringes any patent, then any rights granted to You by such Participant
|
||||
under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used,
|
||||
sold, distributed, or had made, Modifications made by that Participant.
|
||||
|
||||
8.3 If You assert a patent infringement claim against Participant alleging that such
|
||||
Participant’s Contributor Version directly or indirectly infringes any patent where such claim
|
||||
is resolved (such as by license or settlement) prior to the initiation of patent infringement
|
||||
litigation, then the reasonable value of the licenses granted by such Participant under Sections
|
||||
2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or
|
||||
license.
|
||||
|
||||
8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements
|
||||
(excluding distributors and resellers) which have been validly granted by You or any distributor
|
||||
hereunder prior to termination shall survive termination.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT,
|
||||
OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ORIGINAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR
|
||||
ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON
|
||||
FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING,
|
||||
WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION,
|
||||
OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR
|
||||
DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF
|
||||
INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995),
|
||||
consisting of "commercial computer software" and "commercial computer software documentation," as
|
||||
such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48
|
||||
C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered
|
||||
Code with only those rights set forth herein.
|
||||
|
||||
11. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject matter hereof. If any provision
|
||||
of this License is held to be unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. This License shall be governed by California law provisions
|
||||
(except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law
|
||||
provisions. With respect to disputes in which at least one party is a citizen of, or an entity
|
||||
chartered or registered to do business in the United States of America, any litigation relating to
|
||||
this License shall be subject to the jurisdiction of the Federal Courts of the Northern District
|
||||
of California, with venue lying in Santa Clara County, California, with the losing party
|
||||
responsible for costs, including without limitation, court costs and reasonable attorneys’ fees
|
||||
and expenses. The application of the United Nations Convention on Contracts for the International
|
||||
Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a
|
||||
contract shall be construed against the drafter shall not apply to this License.
|
||||
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
As between Initial Developer, Original Developer and the Contributors, each party is responsible
|
||||
for claims and damages arising, directly or indirectly, out of its utilization of rights under
|
||||
this License and You agree to work with Initial Developer, Original Developer and Contributors to
|
||||
distribute such responsibility on an equitable basis. Nothing herein is intended or shall be
|
||||
deemed to constitute any admission of liability.
|
||||
|
||||
13. MULTIPLE-LICENSED CODE.
|
||||
|
||||
Initial Developer may designate portions of the Covered Code as Multiple-Licensed.
|
||||
Multiple-Licensed means that the Initial Developer permits you to utilize portions of the Covered
|
||||
Code under Your choice of the CPAL or the alternative licenses, if any, specified by the Initial
|
||||
Developer in the file described in Exhibit A.
|
||||
|
||||
14. ADDITIONAL TERM: ATTRIBUTION
|
||||
|
||||
(a) As a modest attribution to the organizer of the development of the Original Code ("Original
|
||||
Developer"), in the hope that its promotional value may help justify the time, money and effort
|
||||
invested in writing the Original Code, the Original Developer may include in Exhibit B
|
||||
("Attribution Information") a requirement that each time an Executable and Source Code or a Larger
|
||||
Work is launched or initially run (which includes initiating a session), a prominent display of
|
||||
the Original Developer’s Attribution Information (as defined below) must occur on the graphic user
|
||||
interface employed by the end user to access such Covered Code (which may include display on a
|
||||
splash screen), if any. The size of the graphic image should be consistent with the size of the
|
||||
other elements of the Attribution Information. If the access by the end user to the Executable and
|
||||
Source Code does not create a graphic user interface for access to the Covered Code, this
|
||||
obligation shall not apply. If the Original Code displays such Attribution Information in a
|
||||
particular form (such as in the form of a splash screen, notice at login, an "about" display, or
|
||||
dedicated attribution area on user interface screens), continued use of such form for that
|
||||
Attribution Information is one way of meeting this requirement for notice.
|
||||
|
||||
(b) Attribution information may only include a copyright notice, a brief phrase, graphic image and
|
||||
a URL ("Attribution Information") and is subject to the Attribution Limits as defined below. For
|
||||
these purposes, prominent shall mean display for sufficient duration to give reasonable notice to
|
||||
the user of the identity of the Original Developer and that if You include Attribution Information
|
||||
or similar information for other parties, You must ensure that the Attribution Information for the
|
||||
Original Developer shall be no less prominent than such Attribution Information or similar
|
||||
information for the other party. For greater certainty, the Original Developer may choose to
|
||||
specify in Exhibit B below that the above attribution requirement only applies to an Executable
|
||||
and Source Code resulting from the Original Code or any Modification, but not a Larger Work. The
|
||||
intent is to provide for reasonably modest attribution, therefore the Original Developer cannot
|
||||
require that You display, at any time, more than the following information as Attribution
|
||||
Information: (a) a copyright notice including the name of the Original Developer; (b) a word or
|
||||
one phrase (not exceeding 10 words); (c) one graphic image provided by the Original Developer; and
|
||||
(d) a URL (collectively, the "Attribution Limits").
|
||||
|
||||
(c) If Exhibit B does not include any Attribution Information, then there are no requirements for
|
||||
You to display any Attribution Information of the Original Developer.
|
||||
|
||||
(d) You acknowledge that all trademarks, service marks and/or trade names contained within the
|
||||
Attribution Information distributed with the Covered Code are the exclusive property of their
|
||||
owners and may only be used with the permission of their owners, or under circumstances otherwise
|
||||
permitted by law or as expressly set out in this License.
|
||||
|
||||
15. ADDITIONAL TERM: NETWORK USE.
|
||||
The term "External Deployment" means the use, distribution, or communication of the Original Code
|
||||
or Modifications in any way such that the Original Code or Modifications may be used by anyone
|
||||
other than You, whether those works are distributed or communicated to those persons or made
|
||||
available as an application intended for use over a network. As an express condition for the grants
|
||||
of license hereunder, You must treat any External Deployment by You of the Original Code or
|
||||
Modifications as a distribution under section 3.1 and make Source Code available under Section 3.2.
|
||||
|
||||
EXHIBIT A. Common Public Attribution License Version 1.0.
|
||||
|
||||
"The contents of this file are subject to the Common Public Attribution License Version 1.0 (the
|
||||
"License"); you may not use this file except in compliance with the License. You may obtain a copy
|
||||
of the License at _____________. The License is based on the Mozilla Public License Version 1.1 but
|
||||
Sections 14 and 15 have been added to cover use of software over a computer network and provide for
|
||||
limited attribution for the Original Developer. In addition, Exhibit A has been modified to be
|
||||
consistent with Exhibit B.
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
KIND, either express or implied. See the License for the specific language governing rights and
|
||||
limitations under the License.
|
||||
|
||||
The Original Code is______________________.
|
||||
|
||||
The Original Developer is not the Initial Developer and is __________. If left blank, the Original
|
||||
Developer is the Initial Developer.
|
||||
|
||||
The Initial Developer of the Original Code is ____________. All portions of the code written by
|
||||
___________ are Copyright (c) _____. All Rights Reserved.
|
||||
|
||||
Contributor ______________________.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of the _____ license (the
|
||||
[___] License), in which case the provisions of [______] License are applicable instead of those
|
||||
above.
|
||||
|
||||
If you wish to allow use of your version of this file only under the terms of the [____] License
|
||||
and not to allow others to use your version of this file under the CPAL, indicate your decision by
|
||||
deleting the provisions above and replace them with the notice and other provisions required by
|
||||
the [___] License. If you do not delete the provisions above, a recipient may use your version of
|
||||
this file under either the CPAL or the [___] License."
|
||||
|
||||
[NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source
|
||||
Code files of the Original Code. You should use the text of this Exhibit A rather than the text
|
||||
found in the Original Code Source Code for Your Modifications.]
|
||||
|
||||
EXHIBIT B. Attribution Information
|
||||
|
||||
When the TableEditor is producing and/or controlling the display the Graphic Image must be
|
||||
displayed on the screen visible to the user in a manner comparable to that in the
|
||||
Original Code. The Attribution Phrase must be displayed as a "tooltip" or "hover-text" for
|
||||
that image. The image must be linked to the Attribution URL so as to access that page
|
||||
when clicked. If the user interface includes a prominent "about" display which includes
|
||||
factual prominent attribution in a form similar to that in the "about" display included
|
||||
with the Original Code, including Socialtext copyright notices and URLs, then the image
|
||||
need not be linked to the Attribution URL but the "tool-tip" is still required.
|
||||
|
||||
Attribution Copyright Notice:
|
||||
|
||||
Copyright (C) 2009 Socialtext, Inc.
|
||||
All Rights Reserved.
|
||||
|
||||
Attribution Phrase (not exceeding 10 words): SocialCalc
|
||||
|
||||
Attribution URL: http://www.socialcalc.org
|
||||
|
||||
Graphic Image: The contents of the sc-logo.gif file in the Original Code or
|
||||
a suitable replacement from http://www.socialcalc.org/licenses specified as
|
||||
being for SocialCalc.
|
||||
|
||||
Display of Attribution Information is required in Larger Works which are defined
|
||||
in the CPAL as a work which combines Covered Code or portions thereof with code
|
||||
not governed by the terms of the CPAL.
|
||||
|
||||
|
||||
=========================================
|
||||
THE ARTISTIC LICENSE 2.0
|
||||
=========================================
|
||||
|
||||
The Artistic License 2.0
|
||||
|
||||
Copyright (c) 2000-2006, The Perl Foundation.
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
This license establishes the terms under which a given free software
|
||||
Package may be copied, modified, distributed, and/or redistributed.
|
||||
The intent is that the Copyright Holder maintains some artistic
|
||||
control over the development of that Package while still keeping the
|
||||
Package available as open source and free software.
|
||||
|
||||
You are always permitted to make arrangements wholly outside of this
|
||||
license directly with the Copyright Holder of a given Package. If the
|
||||
terms of this license do not permit the full use that you propose to
|
||||
make of the Package, you should contact the Copyright Holder and seek
|
||||
a different licensing arrangement.
|
||||
|
||||
Definitions
|
||||
|
||||
"Copyright Holder" means the individual(s) or organization(s)
|
||||
named in the copyright notice for the entire Package.
|
||||
|
||||
"Contributor" means any party that has contributed code or other
|
||||
material to the Package, in accordance with the Copyright Holder's
|
||||
procedures.
|
||||
|
||||
"You" and "your" means any person who would like to copy,
|
||||
distribute, or modify the Package.
|
||||
|
||||
"Package" means the collection of files distributed by the
|
||||
Copyright Holder, and derivatives of that collection and/or of
|
||||
those files. A given Package may consist of either the Standard
|
||||
Version, or a Modified Version.
|
||||
|
||||
"Distribute" means providing a copy of the Package or making it
|
||||
accessible to anyone else, or in the case of a company or
|
||||
organization, to others outside of your company or organization.
|
||||
|
||||
"Distributor Fee" means any fee that you charge for Distributing
|
||||
this Package or providing support for this Package to another
|
||||
party. It does not mean licensing fees.
|
||||
|
||||
"Standard Version" refers to the Package if it has not been
|
||||
modified, or has been modified only in ways explicitly requested
|
||||
by the Copyright Holder.
|
||||
|
||||
"Modified Version" means the Package, if it has been changed, and
|
||||
such changes were not explicitly requested by the Copyright
|
||||
Holder.
|
||||
|
||||
"Original License" means this Artistic License as Distributed with
|
||||
the Standard Version of the Package, in its current version or as
|
||||
it may be modified by The Perl Foundation in the future.
|
||||
|
||||
"Source" form means the source code, documentation source, and
|
||||
configuration files for the Package.
|
||||
|
||||
"Compiled" form means the compiled bytecode, object code, binary,
|
||||
or any other form resulting from mechanical transformation or
|
||||
translation of the Source form.
|
||||
|
||||
|
||||
Permission for Use and Modification Without Distribution
|
||||
|
||||
(1) You are permitted to use the Standard Version and create and use
|
||||
Modified Versions for any purpose without restriction, provided that
|
||||
you do not Distribute the Modified Version.
|
||||
|
||||
|
||||
Permissions for Redistribution of the Standard Version
|
||||
|
||||
(2) You may Distribute verbatim copies of the Source form of the
|
||||
Standard Version of this Package in any medium without restriction,
|
||||
either gratis or for a Distributor Fee, provided that you duplicate
|
||||
all of the original copyright notices and associated disclaimers. At
|
||||
your discretion, such verbatim copies may or may not include a
|
||||
Compiled form of the Package.
|
||||
|
||||
(3) You may apply any bug fixes, portability changes, and other
|
||||
modifications made available from the Copyright Holder. The resulting
|
||||
Package will still be considered the Standard Version, and as such
|
||||
will be subject to the Original License.
|
||||
|
||||
|
||||
Distribution of Modified Versions of the Package as Source
|
||||
|
||||
(4) You may Distribute your Modified Version as Source (either gratis
|
||||
or for a Distributor Fee, and with or without a Compiled form of the
|
||||
Modified Version) provided that you clearly document how it differs
|
||||
from the Standard Version, including, but not limited to, documenting
|
||||
any non-standard features, executables, or modules, and provided that
|
||||
you do at least ONE of the following:
|
||||
|
||||
(a) make the Modified Version available to the Copyright Holder
|
||||
of the Standard Version, under the Original License, so that the
|
||||
Copyright Holder may include your modifications in the Standard
|
||||
Version.
|
||||
|
||||
(b) ensure that installation of your Modified Version does not
|
||||
prevent the user installing or running the Standard Version. In
|
||||
addition, the Modified Version must bear a name that is different
|
||||
from the name of the Standard Version.
|
||||
|
||||
(c) allow anyone who receives a copy of the Modified Version to
|
||||
make the Source form of the Modified Version available to others
|
||||
under
|
||||
|
||||
(i) the Original License or
|
||||
|
||||
(ii) a license that permits the licensee to freely copy,
|
||||
modify and redistribute the Modified Version using the same
|
||||
licensing terms that apply to the copy that the licensee
|
||||
received, and requires that the Source form of the Modified
|
||||
Version, and of any works derived from it, be made freely
|
||||
available in that license fees are prohibited but Distributor
|
||||
Fees are allowed.
|
||||
|
||||
|
||||
Distribution of Compiled Forms of the Standard Version
|
||||
or Modified Versions without the Source
|
||||
|
||||
(5) You may Distribute Compiled forms of the Standard Version without
|
||||
the Source, provided that you include complete instructions on how to
|
||||
get the Source of the Standard Version. Such instructions must be
|
||||
valid at the time of your distribution. If these instructions, at any
|
||||
time while you are carrying out such distribution, become invalid, you
|
||||
must provide new instructions on demand or cease further distribution.
|
||||
If you provide valid instructions or cease distribution within thirty
|
||||
days after you become aware that the instructions are invalid, then
|
||||
you do not forfeit any of your rights under this license.
|
||||
|
||||
(6) You may Distribute a Modified Version in Compiled form without
|
||||
the Source, provided that you comply with Section 4 with respect to
|
||||
the Source of the Modified Version.
|
||||
|
||||
|
||||
Aggregating or Linking the Package
|
||||
|
||||
(7) You may aggregate the Package (either the Standard Version or
|
||||
Modified Version) with other packages and Distribute the resulting
|
||||
aggregation provided that you do not charge a licensing fee for the
|
||||
Package. Distributor Fees are permitted, and licensing fees for other
|
||||
components in the aggregation are permitted. The terms of this license
|
||||
apply to the use and Distribution of the Standard or Modified Versions
|
||||
as included in the aggregation.
|
||||
|
||||
(8) You are permitted to link Modified and Standard Versions with
|
||||
other works, to embed the Package in a larger work of your own, or to
|
||||
build stand-alone binary or bytecode versions of applications that
|
||||
include the Package, and Distribute the result without restriction,
|
||||
provided the result does not expose a direct interface to the Package.
|
||||
|
||||
|
||||
Items That are Not Considered Part of a Modified Version
|
||||
|
||||
(9) Works (including, but not limited to, modules and scripts) that
|
||||
merely extend or make use of the Package, do not, by themselves, cause
|
||||
the Package to be a Modified Version. In addition, such works are not
|
||||
considered parts of the Package itself, and are not subject to the
|
||||
terms of this license.
|
||||
|
||||
|
||||
General Provisions
|
||||
|
||||
(10) Any use, modification, and distribution of the Standard or
|
||||
Modified Versions is governed by this Artistic License. By using,
|
||||
modifying or distributing the Package, you accept this license. Do not
|
||||
use, modify, or distribute the Package, if you do not accept this
|
||||
license.
|
||||
|
||||
(11) If your Modified Version has been derived from a Modified
|
||||
Version made by someone other than you, you are nevertheless required
|
||||
to ensure that your Modified Version complies with the requirements of
|
||||
this license.
|
||||
|
||||
(12) This license does not grant you the right to use any trademark,
|
||||
service mark, tradename, or logo of the Copyright Holder.
|
||||
|
||||
(13) This license includes the non-exclusive, worldwide,
|
||||
free-of-charge patent license to make, have made, use, offer to sell,
|
||||
sell, import and otherwise transfer the Package with respect to any
|
||||
patent claims licensable by the Copyright Holder that are necessarily
|
||||
infringed by the Package. If you institute patent litigation
|
||||
(including a cross-claim or counterclaim) against any party alleging
|
||||
that the Package constitutes direct or contributory patent
|
||||
infringement, then this Artistic License to you shall terminate on the
|
||||
date that such litigation is filed.
|
||||
|
||||
(14) Disclaimer of Warranty:
|
||||
THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
|
||||
IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
|
||||
NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
|
||||
LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
[End of LICENSE.txt]
|
||||
|
||||
Includes third-party code from etherpad-lite licensed under the Apache license.
|
||||
|
||||
Apache license
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2013 THE ETHERPAD FOUNDATION
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,203 @@
|
|||
Files: etherpad-lite.ico
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2013 THE ETHERPAD FOUNDATION
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue