Compare commits

...

31 Commits

Author SHA1 Message Date
Baptiste Fotia c11df7ec3b fix(yml):Adapting php release to stable NC version
I adapted the php release to stable NC versions.

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-13 11:02:09 +02:00
Baptiste Fotia 24e0fe8c6b feature(yml): Update the default release of PHP
I updated the default release of PHP to be compliant with the official
documentation admin :
https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html
.

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-13 10:24:51 +02:00
Julius Härtl 2cec861c04 Merge pull request #82 from eneiluj/enh/noid/harmonize-docker-compose
Add stable25 and harmonize stable* container configs
2022-10-06 09:21:57 +02:00
Julien Veyssier 360460d1dd add stable25 and harmonize stable*
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-10-05 18:18:14 +02:00
Julius Härtl abfabbf9fa Merge pull request #83 from arawa/hotfix/redefine-env
refactor(Docker, Bash): Generic env vars
2022-10-05 09:28:29 +02:00
Baptiste Fotia f0615d4ada refactor(Docker, Bash): Generic env vars
I deleted all values related to Julius' home to make it as generic as
possible.
In addition, I changed the value of the COMPOSE_PROJECT_NAME env var to
target the master branch. Otherwise, we cannot join the development instance
with "http://nextcloud.local".

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-04 15:17:03 +02:00
Julius Härtl ca6cd7ab47 Merge pull request #79 from sylvainmetayer/feat_35_add_phpunit 2022-10-03 11:52:28 +02:00
Sylvain 0a9394970a feat(35): add phpunit 2022-10-02 19:46:01 +02:00
Julius Härtl 2c4e5276cd Merge pull request #78 from juliushaertl/enh/depth-1 2022-10-01 18:23:01 +02:00
Julius Härtl eb5d7696fc Add docs about depth and unshallow
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-01 16:52:04 +02:00
Julius Härtl 7c9bdb1eae Use depth 1 to clone
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-01 16:12:31 +02:00
Julius Härtl e810162ce4 Do not preseed the config with the dbuser
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-09-19 20:19:22 +02:00
Julius Härtl 54cd62b844 Pass blackfire client environment variables
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-09-01 09:55:28 +00:00
Julius Härtl 116c812da4 Install blackfire cli on docker
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-09-01 09:53:25 +00:00
Julius Härtl fab4ac3a10 SHellcheck fix
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-07-14 14:46:59 +02:00
Julius Härtl cca7fb8ed8 Move to separate php config file (fixes #73)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-07-14 14:34:25 +02:00
Julius Härtl b891142842 Always fetch protocol when determining ssl proxy usage (fixes #71)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-07-04 11:56:58 +02:00
Julius Härtl e61dd2ab5d Add ripgrep to containers
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-06-10 11:25:06 +02:00
Julius Härtl 063d5cd4e1 Merge pull request #69 from juliushaertl/php-docker-unify
Try to build all php images from the same base Dockerfile
2022-06-01 11:32:40 +02:00
Julius Härtl 0d16eb4fb1 Try to build all php images from the same base Dockerfile
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-30 19:14:21 +02:00
Julius Härtl a2bfe54bf1 Build images daily
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-28 10:04:39 +02:00
Julius Härtl 16a7741b97 Fix shellcheck on new scripts
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-28 09:38:49 +02:00
Julius Härtl 9a3cb54ae3 Fix elasticsearch aliases
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-28 09:36:37 +02:00
Julius Härtl 5d4686d9ad Some README polishing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-28 09:33:51 +02:00
Julius Härtl f98ec3ad2d Choose containers based on architecture
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-28 09:17:19 +02:00
Julius Härtl 7a25435c1b Update collabora readme [skip ci]
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-20 17:58:21 +02:00
Julius Härtl 11fd85e5b9 Do not create extra users on db setup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-20 17:55:26 +02:00
Julius Härtl c0b13acd3b Add stable24 and gs dependencies
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-20 15:43:08 +02:00
Julius Härtl e39b88760b Auto configure collabora for gs
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-20 15:37:40 +02:00
Julius Härtl 9cfb62c252 Move object storage enabling to environment variable
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-20 15:37:40 +02:00
Julius Härtl 5d1ab3f623 Merge pull request #66 from juliushaertl/ci/build-images-without-push
Build containers on pull requests
2022-05-20 15:34:40 +02:00
17 changed files with 611 additions and 309 deletions
+2
View File
@@ -1,6 +1,8 @@
name: 'Docker Publish'
on:
schedule:
- cron: '0 2 * * *'
pull_request:
push:
branches:
+10
View File
@@ -24,3 +24,13 @@ dockerfilelint:
.ONESHELL:
shellcheck:
for file in $$(find . -type f -iname '*.sh' -not -path './wip/*'); do shellcheck --format=gcc $$file; done;
for file in $$(find ./scripts -type f); do shellcheck --format=gcc $$file; done;
.ONESHELL:
template-apply:
cat docker/Dockerfile.php.template | sed 's/php:8.1/php:7.1/' > docker/Dockerfile.php71
cat docker/Dockerfile.php.template | sed 's/php:8.1/php:7.2/' > docker/Dockerfile.php72
cat docker/Dockerfile.php.template | sed 's/php:8.1/php:7.3/' > docker/Dockerfile.php73
cat docker/Dockerfile.php.template | sed 's/php:8.1/php:7.4/' > docker/Dockerfile.php74
cat docker/Dockerfile.php.template | sed 's/php:8.1/php:8.0/' > docker/Dockerfile.php80
cat docker/Dockerfile.php.template | sed 's/php:8.1/php:8.1/' > docker/Dockerfile.php81
+38 -14
View File
@@ -74,6 +74,13 @@ The variable supports the following values:
The docker-compose file provides individual containers for stable Nextcloud releases. In order to run those you will need a checkout of the stable version server branch to your workspace directory. Using [git worktree](https://blog.juliushaertl.de/index.php/2018/01/24/how-to-checkout-multiple-git-branches-at-the-same-time/) makes it easy to have different branches checked out in parallel in separate directories.
Note that for performance reasons the server repository might have been cloned with --depth=1 by default. To get the full history it is highly recommended to run:
cd workspace/server
git fetch --unshallow
This may take some time depending on your internet connection speed.
```
cd workspace/server
git worktree add ../stable23 stable23
@@ -109,6 +116,12 @@ You might need to add the domains to your `/etc/hosts` file:
This is assuming you have set `DOMAIN_SUFFIX=.local`
You can generate it through:
```
awk -v D=.local '/- [A-z0-9]+\${DOMAIN_SUFFIX}/ {sub("\\$\{DOMAIN_SUFFIX\}", D " 127.0.0.1", $2); print $2}' docker-compose.yml
```
You can generate selfsigned certificates using:
```
@@ -120,9 +133,9 @@ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nextcloud.local.key
Instead of adding the individual container domains to `/etc/hosts` a local dns server like dnsmasq can be used to resolve any domain ending with the configured DOMAIN_SUFFIX in `.env` to localhost.
For dnsmasq adding the following configuration would be sufficient for `DOMAIN_SUFFIX=.dev.local`:
For dnsmasq adding the following configuration would be sufficient for `DOMAIN_SUFFIX=.local`:
```
address=/.dev.local/127.0.0.1
address=/.local/127.0.0.1
```
### Use valid certificates trusted by your system
@@ -161,17 +174,29 @@ Example users are: `leela fry bender zoidberg hermes professor`. The password is
Useful commands:
```
docker-compose exec ldap ldapsearch -H 'ldap://localhost' -D "cn=admin,dc=planetexpress,dc=com" -w admin -b "dc=planetexpress,dc=com" "(&(objectclass=inetOrgPerson)(description=*use*))"
```
## Collabora
- Make sure to have the collabora hostname setup in your /etc/hosts file: `127.0.0.1 collabora.local`
- If using SSL: set `'overwriteprotocol' => 'https'` to make sure proper URLs are handed over to collabora
- Start the Collabora Online server in addition to your other containers `docker-compose up -d collabora`
- Make sure you have the richdocuments app cloned to your apps-extra directory and built the frontend code of the app with `npm ci && npm run build`
- Enable the app and configure `collabora.local` in the Collabora settings inside of Nextcloud
- Automatically enable for one of your containers (e.g. the main nextcloud one):
- Run `./scripts/enable-collabora nextcloud`
- Manual setup
- Start the Collabora Online server in addition to your other containers `docker-compose up -d collabora`
- Make sure you have the richdocuments app cloned to your apps-extra directory and built the frontend code of the app with `npm ci && npm run build`
- Enable the app and configure `collabora.local` in the Collabora settings inside of Nextcloud
## ONLYOFFICE
- Make sure to have the collabora hostname setup in your /etc/hosts file: `127.0.0.1 onlyoffice.local`
- Automatically enable for one of your containers (e.g. the main nextcloud one):
- Run `./scripts/enable-onlyoffice nextcloud`
- Manual setup
- Start the ONLYOFFICE server in addition to your other containers `docker-compose up -d onlyoffice`
- Clone https://github.com/ONLYOFFICE/onlyoffice-nextcloud into your apps directory
- Enable the app and configure `onlyoffice.local` in the ONLYOFFICE settings inside of Nextcloud
## Antivirus
@@ -264,11 +289,10 @@ docker-compose up -d elasticsearch elasticsearch-ui
## Object storage
In `data/additional.config.php`, uncomment the 'objectstore' config and
then start docker with minio enabled.
Primary object storage can be enabled by setting the `PRIMARY=minio` environment variable either in your .env file or in docker-compose.yml for individual containers.
```bash
docker-composer up proxy nextcloud minio
docker-compose up proxy nextcloud minio
```
## Development
@@ -295,20 +319,20 @@ sudo -E -u www-data php -dxdebug.remote_host=192.168.21.1 occ
- nextcloud
- 09e3c268-d8bc-42f1-b7c6-74d307ef5fde
## GS
## Global scale
```
docker-compose up -d proxy portal gs1 gs2 lookup database-mysql redis collabora
docker-compose up -d proxy portal gs1 gs2 lookup database-mysql
```
Users are named the same as the instance name, e.g. gs1, gs2
## Imaginary
## Imaginary
Enable the imaginary server for generating previews
```bash
docker-composer up proxy nextcloud previews_hpb
docker-compose up proxy nextcloud previews_hpb
./scripts/enable-preview-imaginary.sh
```
+26 -9
View File
@@ -55,17 +55,17 @@ mkdir -p workspace/
(
(
echo "🌏 Fetching server (this might take a while to finish)" &&
git clone https://github.com/nextcloud/server.git workspace/server 2>&1 | indent_cli &&
git clone https://github.com/nextcloud/server.git --depth 1 workspace/server 2>&1 | indent_cli &&
cd workspace/server && git submodule update --init 2>&1 | indent_cli
) || echo "❌ Failed to clone Nextcloud server code"
) | indent
(
(
cd workspace/server && \
git worktree add ../stable19 stable19 2>&1 | indent_cli
) || echo "❌ Failed to setup worktree for stable19"
) | indent
#(
# (
# cd workspace/server && \
# git worktree add ../stable19 stable19 2>&1 | indent_cli
# ) || echo "❌ Failed to setup worktree for stable19"
#) | indent
mkdir -p workspace/server/apps-extra
install_app viewer
@@ -78,7 +78,7 @@ echo
echo "⏩ Setup your environment in an .env file"
if [ ! -f ".env" ]; then
cat <<EOT >.env
COMPOSE_PROJECT_NAME=nextcloud
COMPOSE_PROJECT_NAME=master
DOMAIN_SUFFIX=.local
REPO_PATH_SERVER=$PWD/workspace/server
ADDITIONAL_APPS_PATH=$PWD/workspace/server/apps-extra
@@ -88,6 +88,14 @@ DOCKER_SUBNET=192.168.21.0/24
PORTBASE=821
EOT
fi
if [[ $(uname -m) == 'arm64' ]]; then
echo "Setting custom containers for arm platform"
echo "CONTAINER_ONLYOFFICE=onlyoffice/documentserver:latest-arm64" >> .env
echo "CONTAINER_KEYCLOAK=mihaibob/keycloak:15.0.1" >> .env
fi
cat <<EOF
@@ -110,7 +118,16 @@ cat <<EOF
$ docker-compose down -v
For more details about the individual setup options see
Note that for performance reasons the server repository has been cloned with
--depth=1. To get the full history it is highly recommended to run:
$ cd workspace/server
$ git fetch --unshallow
This may take some time depending on your internet connection speed.
For more details about the individual setup options see
the README.md file or checkout the repo at
https://github.com/juliushaertl/nextcloud-docker-dev
EOF
+56 -38
View File
@@ -1,51 +1,69 @@
<?php
// FIXME: Move everything except the last part to the containers
// set the hostname to the VIRTUAL_HOST set for the docker container, otherwise fallback to the docker hostname
$hostname = gethostname();
$primary = isset($_ENV['PRIMARY']) ? $_ENV['PRIMARY'] : '';
$virtualHost = isset($_ENV['VIRTUAL_HOST']) ? $_ENV['VIRTUAL_HOST'] : '';
$virtualHost = explode(".", $virtualHost);
if (count($virtualHost) > 0) {
$hostname = array_shift($virtualHost);
}
$CONFIG = array (
// 'htaccess.RewriteBase' => '/',
// Uncomment to create instances with minio object storage
/* /
'objectstore' =>
array (
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' =>
$CONFIG = [];
if ($primary === 'minio') {
$CONFIG += [
'objectstore' =>
array (
'bucket' => 'nc-' . $hostname,
'key' => 'nextcloud',
'secret' => 'nextcloud',
'hostname' => 'minio',
'port' => '9000',
'use_ssl' => false,
'use_path_style' => true,
'autocreate' => true,
),
),
/* */
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' =>
array (
'bucket' => 'nc-' . $hostname,
'key' => 'nextcloud',
'secret' => 'nextcloud',
'hostname' => 'minio',
'port' => '9000',
'use_ssl' => false,
'use_path_style' => true,
'autocreate' => true,
'verify_bucket_exists' => true,
),
)
];
}
/* /
'objectstore_multibucket' => array(
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' => array(
// optional, defaults to 64
'num_buckets' => 64,
// n integer in the range from 0 to (num_buckets-1) will be appended
'bucket' => 'nextcloud_',
'bucket' => 'nc-' . $hostname,
'key' => 'nextcloud',
'secret' => 'nextcloud',
'hostname' => 'minio',
'port' => '9000',
'use_ssl' => false,
'use_path_style' => true,
if ($primary === 'minio-multibucket') {
$CONFIG += [
'objectstore_multibucket' => array(
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' => array(
// optional, defaults to 64
'num_buckets' => 64,
// n integer in the range from 0 to (num_buckets-1) will be appended
'bucket' => 'nextcloud_',
'bucket' => 'nc-' . $hostname,
'key' => 'nextcloud',
'secret' => 'nextcloud',
'hostname' => 'minio',
'port' => '9000',
'use_ssl' => false,
'use_path_style' => true,
),
),
),
/* */
];
}
// Useful config values during development
$CONFIG += array(
'debug' => true,
'loglevel' => 2,
// 'htaccess.RewriteBase' => '/',
'log_query' => false,
'query_log_file' => '/var/www/html/data/query.log',
'diagnostics.logging' => false,
'diagnostics.logging.threshold' => 0,
'log.condition' => [
'apps' => ['diagnostics', 'admin_audit'],
],
);
+175 -55
View File
@@ -34,6 +34,7 @@ services:
- stable22${DOMAIN_SUFFIX}
- stable23${DOMAIN_SUFFIX}
- stable24${DOMAIN_SUFFIX}
- stable25${DOMAIN_SUFFIX}
- collabora${DOMAIN_SUFFIX}
- onlyoffice${DOMAIN_SUFFIX}
- proxy${DOMAIN_SUFFIX}
@@ -44,8 +45,8 @@ services:
- gs1${DOMAIN_SUFFIX}
- gs2${DOMAIN_SUFFIX}
- lookup${DOMAIN_SUFFIX}
- elasticsearch{DOMAIN_SUFFIX}
- elasticsearch-ui{DOMAIN_SUFFIX}
- elasticsearch${DOMAIN_SUFFIX}
- elasticsearch-ui${DOMAIN_SUFFIX}
haproxy:
image: haproxy
@@ -57,7 +58,7 @@ services:
- ./docker/configs/haproxy.conf:/usr/local/etc/haproxy/haproxy.cfg:ro
nextcloud:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
environment:
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
@@ -66,11 +67,13 @@ services:
VIRTUAL_HOST: "nextcloud${DOMAIN_SUFFIX}"
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
BLACKFIRE_CLIENT_ID:
BLACKFIRE_CLIENT_TOKEN:
volumes:
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/server}:/var/www/html'
- '${REPO_PATH_SERVER}:/var/www/html'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
- data:/var/www/html/data
- config:/var/www/html/config
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
@@ -85,12 +88,12 @@ services:
- host.docker.internal:host-gateway
nextcloud2:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
environment:
SQL: 'mysql'
VIRTUAL_HOST: "nextcloud2${DOMAIN_SUFFIX}"
volumes:
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/server}:/var/www/html'
- '${REPO_PATH_SERVER}:/var/www/html'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
@@ -104,12 +107,12 @@ services:
- host.docker.internal:host-gateway
nextcloud3:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
environment:
SQL: 'mysql'
SQL: ${SQL:-mysql}
VIRTUAL_HOST: "nextcloud3${DOMAIN_SUFFIX}"
volumes:
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/server}:/var/www/html'
- '${REPO_PATH_SERVER}:/var/www/html'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
- ./data/skeleton/:/skeleton
- ./docker/configs/config.php:/var/www/html/config/writable.config.php:ro
@@ -122,9 +125,9 @@ services:
- host.docker.internal:host-gateway
stable16:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-72}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
environment:
SQL: 'sqlite'
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
@@ -132,23 +135,27 @@ services:
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
volumes:
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable16:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable16/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/stable16:/var/www/html'
- '${STABLE_ROOT_PATH}/stable16/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
stable17:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-72}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
environment:
SQL: 'sqlite'
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
@@ -156,23 +163,27 @@ services:
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
volumes:
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable17:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable17/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/stable17:/var/www/html'
- '${STABLE_ROOT_PATH}/stable17/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
stable18:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
environment:
SQL: 'sqlite'
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
@@ -180,25 +191,27 @@ services:
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
volumes:
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable18:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable18/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/stable18:/var/www/html'
- '${STABLE_ROOT_PATH}/stable18/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
stable19:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-72}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
environment:
SQL: 'sqlite'
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
@@ -206,20 +219,27 @@ services:
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
volumes:
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable19:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable19/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/stable19:/var/www/html'
- '${STABLE_ROOT_PATH}/stable19/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
stable20:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-72}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
environment:
SQL: 'sqlite'
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
@@ -227,20 +247,27 @@ services:
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
volumes:
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable20:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable20/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/stable20:/var/www/html'
- '${STABLE_ROOT_PATH}/stable20/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
stable21:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-80}:latest
environment:
SQL: 'sqlite'
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
@@ -248,20 +275,27 @@ services:
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
volumes:
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable21:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable21/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/stable21:/var/www/html'
- '${STABLE_ROOT_PATH}/stable21/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
stable22:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-80}:latest
environment:
SQL: 'sqlite'
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
@@ -269,23 +303,27 @@ services:
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
volumes:
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable22:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable22/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/stable22:/var/www/html'
- '${STABLE_ROOT_PATH}/stable22/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
stable23:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-80}:latest
environment:
SQL: 'sqlite'
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
@@ -293,10 +331,74 @@ services:
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
volumes:
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable23:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable23/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/stable23:/var/www/html'
- '${STABLE_ROOT_PATH}/stable23/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
stable24:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-80}:latest
environment:
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable24${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
volumes:
- '${STABLE_ROOT_PATH}/stable24:/var/www/html'
- '${STABLE_ROOT_PATH}/stable24/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
stable25:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
environment:
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable25${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
volumes:
- '${STABLE_ROOT_PATH}/stable25:/var/www/html'
- '${STABLE_ROOT_PATH}/stable25/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
@@ -418,16 +520,17 @@ services:
aliasgroup6: http://stable22${DOMAIN_SUFFIX}
aliasgroup7: http://stable23${DOMAIN_SUFFIX}
aliasgroup8: http://stable24${DOMAIN_SUFFIX}
aliasgroup9: http://stable25${DOMAIN_SUFFIX}
dictionaries: de_DE en_US en_GB
username: admin
password: admin
VIRTUAL_HOST: collabora${DOMAIN_SUFFIX}
VIRTUAL_PORT: 9980
VIRTUAL_PROTO: http
extra_params: "--o:ssl.enable=false --o:net.frame_ancestors=*.dev.local"
extra_params: "--o:ssl.enable=false --o:net.frame_ancestors=*${DOMAIN_SUFFIX}"
onlyoffice:
image: onlyoffice/documentserver-ee:latest
image: ${CONTAINER_ONLYOFFICE:-onlyoffice/documentserver:latest}
environment:
VIRTUAL_HOST: onlyoffice${DOMAIN_SUFFIX}
expose:
@@ -495,7 +598,7 @@ services:
NEXTCLOUD_URL: https://nextcloud.local.dev.bitgrid.net
keycloak:
image: quay.io/keycloak/keycloak:13.0.1
image: ${CONTAINER_KEYCLOAK:-quay.io/keycloak/keycloak:15.0.1}
expose:
- 8080
volumes:
@@ -516,51 +619,68 @@ services:
- clam:/var/lib/clamav
portal:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
environment:
VIRTUAL_HOST: portal${DOMAIN_SUFFIX}
SQL: 'mysql'
GS_MODE: master
volumes:
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/server}:/var/www/html'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/server:/var/www/html'
- '${STABLE_ROOT_PATH}/server/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
depends_on:
- proxy
- database-mysql
- lookup
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
gs1:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
environment:
VIRTUAL_HOST: gs1${DOMAIN_SUFFIX}
SQL: 'mysql'
GS_MODE: slave
volumes:
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/server}:/var/www/html'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/server:/var/www/html'
- '${STABLE_ROOT_PATH}/server/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
depends_on:
- proxy
- portal
- database-mysql
- lookup
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
gs2:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
environment:
VIRTUAL_HOST: gs2${DOMAIN_SUFFIX}
SQL: 'mysql'
GS_MODE: slave
volumes:
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/server}:/var/www/html'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH}/server:/var/www/html'
- '${STABLE_ROOT_PATH}/server/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
depends_on:
- proxy
- portal
- database-mysql
- lookup
- redis
- mail
extra_hosts:
@@ -571,7 +691,7 @@ services:
environment:
VIRTUAL_HOST: "lookup${DOMAIN_SUFFIX}"
# volumes:
# - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/lookupserver:/var/www/html'
# - '${STABLE_ROOT_PATH}/lookupserver:/var/www/html'
extra_hosts:
- host.docker.internal:host-gateway
+97
View File
@@ -0,0 +1,97 @@
FROM php:8.1-apache
RUN apt-get update && apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libpng-dev \
libpq-dev \
libxml2-dev \
libzip-dev \
libmagickwand-dev \
libmagickcore-6.q16-3-extra \
libsmbclient-dev \
&& rm -rf /var/lib/apt/lists/*
RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install \
exif \
gd \
intl \
ldap \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
zip
RUN pecl install APCu; \
pecl install memcached; \
pecl install redis; \
pecl install xdebug; \
pecl install imagick; \
pecl install smbclient; \
pecl install mcrypt; \
\
docker-php-ext-enable \
apcu \
memcached \
redis \
xdebug \
imagick \
smbclient; \
docker-php-source delete && \
rm -r /tmp/* /var/cache/*
# dev tools separate install so we quickly change without rebuilding all php extensions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN cd /tmp && curl -L https://phar.phpunit.de/phpunit.phar > phpunit.phar && \
chmod +x phpunit.phar && \
mv /tmp/phpunit.phar /usr/local/bin/phpunit
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
echo '[global]'; \
echo 'client min protocol = SMB2'; \
echo 'client max protocol = SMB3'; \
echo 'hide dot files = no'; \
} > /etc/samba/smb.conf
RUN mkdir --parent /var/log/cron
ADD configs/cron.conf /etc/nc-cron.conf
RUN crontab /etc/nc-cron.conf
ADD configs/php/nextcloud.ini /usr/local/etc/php/conf.d/nextcloud.ini
ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# Setup blackfire probe
RUN wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends blackfire-php blackfire \
&& printf "blackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini \
&& rm -rf /var/lib/apt/lists/*
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php /root/
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
+31 -38
View File
@@ -11,13 +11,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libpng-dev \
libpq-dev \
libxml2-dev \
libzip-dev \
libmagickwand-dev \
libmagickcore-6.q16-3-extra \
libsmbclient-dev \
&& rm -rf /var/lib/apt/lists/*
RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install \
exif \
@@ -30,26 +31,36 @@ RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
pdo_pgsql \
zip
RUN pecl install APCu-5.1.11; \
pecl install memcached-3.0.4; \
pecl install redis-4.2.0; \
RUN pecl install APCu; \
pecl install memcached; \
pecl install redis; \
pecl install xdebug; \
pecl install imagick; \
pecl install smbclient; \
pecl install mcrypt; \
\
docker-php-ext-enable \
apcu \
memcached \
redis \
xdebug \
imagick \
smbclient
imagick \
smbclient; \
docker-php-source delete && \
rm -r /tmp/* /var/cache/*
# dev tools separate install so we quickly change without rebuilding all php extenions
# dev tools separate install so we quickly change without rebuilding all php extensions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN cd /tmp && curl -L https://phar.phpunit.de/phpunit.phar > phpunit.phar && \
chmod +x phpunit.phar && \
mv /tmp/phpunit.phar /usr/local/bin/phpunit
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
echo '[global]'; \
echo 'client min protocol = SMB2'; \
@@ -61,39 +72,20 @@ RUN mkdir --parent /var/log/cron
ADD configs/cron.conf /etc/nc-cron.conf
RUN crontab /etc/nc-cron.conf
# PHP configuration
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.enable_cli=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
{ \
echo 'xdebug.remote_enable=on'; \
echo 'xdebug.remote_connect_back=on'; \
echo 'xdebug.idekey=PHPSTORM'; \
echo 'xdebug.remote_autostart=1'; \
} > /usr/local/etc/php/conf.d/xdebug.ini; \
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini
ADD configs/php/nextcloud.ini /usr/local/etc/php/conf.d/nextcloud.ini
ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# Setup blackfire probe
ENV current_os=linux
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/$current_os/amd64/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
RUN wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends blackfire-php blackfire \
&& printf "blackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini \
&& rm -rf /var/lib/apt/lists/*
RUN a2enmod rewrite && a2enmod headers && a2enmod env
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php /root/
ADD apache-all/bootstrap.sh apache-all/occ /usr/local/bin/
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
@@ -101,4 +93,5 @@ WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
COPY data/skeleton /skeleton
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php /root/
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
+28 -35
View File
@@ -1,7 +1,6 @@
FROM php:7.2-apache
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
@@ -12,13 +11,14 @@ RUN apt-get install -y --no-install-recommends \
libpng-dev \
libpq-dev \
libxml2-dev \
libzip-dev \
libmagickwand-dev \
libmagickcore-6.q16-3-extra \
libsmbclient-dev \
&& rm -rf /var/lib/apt/lists/*
RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install \
exif \
@@ -31,9 +31,9 @@ RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
pdo_pgsql \
zip
RUN pecl install APCu-5.1.18; \
pecl install memcached-3.1.4; \
pecl install redis-5.1.1; \
RUN pecl install APCu; \
pecl install memcached; \
pecl install redis; \
pecl install xdebug; \
pecl install imagick; \
pecl install smbclient; \
@@ -44,14 +44,23 @@ RUN pecl install APCu-5.1.18; \
memcached \
redis \
xdebug \
imagick \
smbclient
imagick \
smbclient; \
docker-php-source delete && \
rm -r /tmp/* /var/cache/*
# dev tools separate install so we quickly change without rebuilding all php extenions
# dev tools separate install so we quickly change without rebuilding all php extensions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 sqlite3 \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN cd /tmp && curl -L https://phar.phpunit.de/phpunit.phar > phpunit.phar && \
chmod +x phpunit.phar && \
mv /tmp/phpunit.phar /usr/local/bin/phpunit
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
echo '[global]'; \
echo 'client min protocol = SMB2'; \
@@ -63,34 +72,20 @@ RUN mkdir --parent /var/log/cron
ADD configs/cron.conf /etc/nc-cron.conf
RUN crontab /etc/nc-cron.conf
# PHP configuration
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.enable_cli=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini
ADD configs/php/nextcloud.ini /usr/local/etc/php/conf.d/nextcloud.ini
ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# Setup blackfire probe
ENV current_os=linux
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/$current_os/amd64/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
RUN wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends blackfire-php blackfire \
&& printf "blackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini \
&& rm -rf /var/lib/apt/lists/*
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN a2enmod rewrite && a2enmod headers && a2enmod env
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
@@ -99,6 +94,4 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php /root/
ADD bin/* /usr/local/bin/
COPY data/skeleton /skeleton
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
+26 -38
View File
@@ -1,7 +1,6 @@
FROM php:7.3-apache
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
@@ -19,7 +18,7 @@ RUN apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install \
exif \
@@ -32,9 +31,9 @@ RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
pdo_pgsql \
zip
RUN pecl install APCu-5.1.18; \
pecl install memcached-3.1.5; \
pecl install redis-5.2.0; \
RUN pecl install APCu; \
pecl install memcached; \
pecl install redis; \
pecl install xdebug; \
pecl install imagick; \
pecl install smbclient; \
@@ -45,15 +44,22 @@ RUN pecl install APCu-5.1.18; \
memcached \
redis \
xdebug \
imagick \
smbclient
imagick \
smbclient; \
docker-php-source delete && \
rm -r /tmp/* /var/cache/*
# dev tools separate install so we quickly change without rebuilding all php extenions
# dev tools separate install so we quickly change without rebuilding all php extensions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install PHPUnit
RUN cd /tmp && curl -L https://phar.phpunit.de/phpunit.phar > phpunit.phar && \
chmod +x phpunit.phar && \
mv /tmp/phpunit.phar /usr/local/bin/phpunit
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
echo '[global]'; \
@@ -66,44 +72,26 @@ RUN mkdir --parent /var/log/cron
ADD configs/cron.conf /etc/nc-cron.conf
RUN crontab /etc/nc-cron.conf
# PHP configuration
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.enable_cli=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini
ADD configs/php/nextcloud.ini /usr/local/etc/php/conf.d/nextcloud.ini
ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# Setup blackfire probe
ENV current_os=linux
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/$current_os/amd64/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
RUN wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends blackfire-php blackfire \
&& printf "blackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini \
&& rm -rf /var/lib/apt/lists/*
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN a2enmod rewrite && a2enmod headers && a2enmod env
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
VOLUME ["/var/www/html/data", "/var/www/html/config", "/var/www/html/apps-writable"]
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php /root/
ADD bin/* /usr/local/bin/
COPY data/skeleton /skeleton
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
+23 -31
View File
@@ -1,7 +1,6 @@
FROM php:7.4-apache
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
@@ -32,9 +31,9 @@ RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
pdo_pgsql \
zip
RUN pecl install APCu-5.1.18; \
pecl install memcached-3.1.5; \
pecl install redis-5.2.0; \
RUN pecl install APCu; \
pecl install memcached; \
pecl install redis; \
pecl install xdebug; \
pecl install imagick; \
pecl install smbclient; \
@@ -45,14 +44,21 @@ RUN pecl install APCu-5.1.18; \
memcached \
redis \
xdebug \
imagick \
smbclient
imagick \
smbclient; \
docker-php-source delete && \
rm -r /tmp/* /var/cache/*
# dev tools separate install so we quickly change without rebuilding all php extenions
# dev tools separate install so we quickly change without rebuilding all php extensions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN cd /tmp && curl -L https://phar.phpunit.de/phpunit.phar > phpunit.phar && \
chmod +x phpunit.phar && \
mv /tmp/phpunit.phar /usr/local/bin/phpunit
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
@@ -66,40 +72,26 @@ RUN mkdir --parent /var/log/cron
ADD configs/cron.conf /etc/nc-cron.conf
RUN crontab /etc/nc-cron.conf
# PHP configuration
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.enable_cli=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini
ADD configs/php/nextcloud.ini /usr/local/etc/php/conf.d/nextcloud.ini
ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# Setup blackfire probe
RUN wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add -; \
echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list \
apt update \
apt install blackfire-php
RUN wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends blackfire-php blackfire \
&& printf "blackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini \
&& rm -rf /var/lib/apt/lists/*
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN a2enmod rewrite && a2enmod headers && a2enmod env
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
VOLUME ["/var/www/html/data", "/var/www/html/config", "/var/www/html/apps-writable"]
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php /root/
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
COPY data/skeleton /skeleton
+23 -31
View File
@@ -1,7 +1,6 @@
FROM php:8.0-apache
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
@@ -32,8 +31,8 @@ RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
pdo_pgsql \
zip
RUN pecl install APCu-5.1.18; \
pecl install memcached-3.1.5; \
RUN pecl install APCu; \
pecl install memcached; \
pecl install redis; \
pecl install xdebug; \
pecl install imagick; \
@@ -45,21 +44,20 @@ RUN pecl install APCu-5.1.18; \
memcached \
redis \
xdebug \
imagick \
smbclient
imagick \
smbclient; \
docker-php-source delete && \
rm -r /tmp/* /var/cache/*
# dev tools separate install so we quickly change without rebuilding all php extenions
# dev tools separate install so we quickly change without rebuilding all php extensions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Setup blackfire probe
RUN wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends blackfire-php \
&& printf "blackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN cd /tmp && curl -L https://phar.phpunit.de/phpunit.phar > phpunit.phar && \
chmod +x phpunit.phar && \
mv /tmp/phpunit.phar /usr/local/bin/phpunit
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
@@ -74,30 +72,24 @@ RUN mkdir --parent /var/log/cron
ADD configs/cron.conf /etc/nc-cron.conf
RUN crontab /etc/nc-cron.conf
# PHP configuration
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.enable_cli=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini
ADD configs/php/nextcloud.ini /usr/local/etc/php/conf.d/nextcloud.ini
ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# Setup blackfire probe
RUN wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends blackfire-php blackfire \
&& printf "blackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini \
&& rm -rf /var/lib/apt/lists/*
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN a2enmod rewrite && a2enmod headers && a2enmod env
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
VOLUME ["/var/www/html/data", "/var/www/html/config", "/var/www/html/apps-writable"]
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
+11 -19
View File
@@ -1,7 +1,6 @@
FROM php:8.1-apache
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
@@ -45,16 +44,21 @@ RUN pecl install APCu; \
memcached \
redis \
xdebug \
imagick \
imagick \
smbclient; \
docker-php-source delete && \
rm -r /tmp/* /var/cache/*
# dev tools separate install so we quickly change without rebuilding all php extenions
# dev tools separate install so we quickly change without rebuilding all php extensions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN cd /tmp && curl -L https://phar.phpunit.de/phpunit.phar > phpunit.phar && \
chmod +x phpunit.phar && \
mv /tmp/phpunit.phar /usr/local/bin/phpunit
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
@@ -68,26 +72,14 @@ RUN mkdir --parent /var/log/cron
ADD configs/cron.conf /etc/nc-cron.conf
RUN crontab /etc/nc-cron.conf
# PHP configuration
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.enable_cli=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini
ADD configs/php/nextcloud.ini /usr/local/etc/php/conf.d/nextcloud.ini
ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# Setup blackfire probe
RUN wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends blackfire-php \
&& apt-get install -y --no-install-recommends blackfire-php blackfire \
&& printf "blackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini \
&& rm -rf /var/lib/apt/lists/*
+7 -1
View File
@@ -49,6 +49,7 @@ configure_gs() {
OCC config:system:set gss.jwt.key --value 'random-key'
OCC config:system:set gss.mode --value 'master'
OCC config:system:set gss.master.admin 0 --value 'admin'
OCC config:system:set gss.master.csp-allow 0 --value "*${DOMAIN_SUFFIX}"
fi
if [ "$GS_MODE" = "slave" ]
@@ -103,7 +104,8 @@ configure_oidc() {
PROTOCOL=""
get_protocol() {
if [[ "$PROTOCOL" == "" ]]; then
timeout 5 bash -c 'until echo > /dev/tcp/proxy/443; do sleep 0.5; done'
echo " Detecting SSL..."
timeout 5 bash -c 'until echo > /dev/tcp/proxy/443; do sleep 0.5; done' 2>/dev/null
if [ $? -eq 0 ]; then
echo "🔑 SSL proxy available, configuring proxy settings"
PROTOCOL=https
@@ -115,6 +117,7 @@ get_protocol() {
}
configure_ssl_proxy() {
get_protocol
if [[ "$PROTOCOL" == "https" ]]; then
echo "🔑 SSL proxy available, configuring proxy settings"
OCC config:system:set overwriteprotocol --value https
@@ -209,6 +212,9 @@ install() {
# Setup initial configuration
OCC background:cron
# Trigger initial cron run
sudo -E -u www-data php cron.php &
# run custom shell script from nc root
# [ -e /var/www/html/nc-dev-autosetup.sh ] && bash /var/www/html/nc-dev-autosetup.sh
+12
View File
@@ -0,0 +1,12 @@
display_startup_errors=0
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
apc.enable_cli=1
memory_limit=512M
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
if [ -z "$1" ]
then
echo "Usage $0 CONTAINER"
exit 1
fi
CONTAINER=$1
function occ() {
docker compose exec "$CONTAINER" sudo -E -u www-data "./occ" "$@"
}
# shellcheck disable=SC1091
source .env
echo "Setting up Collabora with collabora$DOMAIN_SUFFIX on $CONTAINER"
docker-compose up -d collabora
occ app:enable richdocuments
occ config:app:set richdocuments wopi_url --value="http://collabora${DOMAIN_SUFFIX}"
occ config:app:set richdocuments public_wopi_url --value="http://collabora${DOMAIN_SUFFIX}"
occ config:system:set allow_local_remote_servers --value true --type bool
occ config:system:set gs.trustedHosts 0 --value "*${DOMAIN_SUFFIX}"
occ richdocuments:activate-config
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
if [ -z "$1" ]
then
echo "Usage $0 CONTAINER"
exit 1
fi
CONTAINER=$1
function occ() {
docker compose exec "$CONTAINER" sudo -E -u www-data "./occ" "$@"
}
# shellcheck disable=SC1091
source .env
echo "Setting up ONLYOFFICE with onlyoffice$DOMAIN_SUFFIX on $CONTAINER"
docker-compose up -d onlyoffice
occ app:enable onlyoffice --force
occ config:app:set onlyoffice DocumentServerUrl --value="http://onlyoffice$DOMAIN_SUFFIX"