Compare commits

..

18 Commits

Author SHA1 Message Date
Baptiste Fotia 201da97178 docs(md): Apply the Julius' request change
https://github.com/juliushaertl/nextcloud-docker-dev/pull/87#discussion_r995661925

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-14 15:53:39 +02:00
Baptiste Fotia e3594fe5c4 doc(md):Specify stop containers and run background
I specified how to stop containers (Ctrl+C) and run containers in the
background.

https://github.com/juliushaertl/nextcloud-docker-dev/pull/87#discussion_r995663846

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-14 15:47:23 +02:00
Baptiste Fotia 7442538c2f doc(md): Rewrite the Julius' alert
I rewrite the Julius' alert on the use of the project.

https://github.com/juliushaertl/nextcloud-docker-dev/pull/87#discussion_r995755834

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-14 15:23:11 +02:00
Baptiste Fotia 6625132927 doc(md): Change the doc to use the mysql prompt
We can use the "docker compose exec" command to be in the mysql prompt.

https://github.com/juliushaertl/nextcloud-docker-dev/pull/87#discussion_r995657456

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-14 15:18:10 +02:00
Baptiste Fotia 9b3ed6ee3c docs(md): Move configure-vars-env to manual-setup
I move the content of the configure-vars-env.md file to the
manual-setup.md file.

https://github.com/juliushaertl/nextcloud-docker-dev/pull/87#discussion_r995655130

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-14 14:59:31 +02:00
Baptiste Fotia 61db98eeee doc(md):Remove any ambigouity about Daphne README
I specify to read the README.md from tutorial by Daphne.

Read the Julius' comment : https://github.com/juliushaertl/nextcloud-docker-dev/pull/87#discussion_r995653977

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-14 14:17:42 +02:00
Baptiste Fotia 2b73c61480 Update README.md
I accepted this change

Co-authored-by: Julius Härtl <jus@bitgrid.net>
2022-10-14 14:11:02 +02:00
Baptiste Fotia a34c73df3b docs(md): Add the Daphne's Tutorial
Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-14 11:51:03 +02:00
Baptiste Fotia 1422c78fe8 Merge branch 'doc/improve-getting-started' of https://github.com/arawa/nextcloud-docker-dev into doc/improve-getting-started 2022-10-13 14:30:13 +02:00
Baptiste Fotia a32dec1516 docs(md): Add the bash type for markdown
Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-13 14:28:28 +02:00
Baptiste Fotia 998b7a06ed docs(md): Move the Useful commands section
I moved the Useful command section to a new file 'docs/useful-commands.md' where we can list all tips for using the container commands or how to use the docker command line.

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-13 14:24:17 +02:00
Baptiste Fotia 8f0ba7b3cb docs(md,env):REPO_PATH_SERVER is generic
The instructions on the REPO_PATH_SERVER env var are generic now.

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-13 14:09:53 +02:00
Baptiste Fotia f5ec329fd9 docs(md): Add a link to ssl.md
I forgot to add a link to ssl.md

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-13 12:05:46 +02:00
Baptiste Fotia b501b22a3b doc(md): Fix the default PHP release
Following the comment by @come-nc :
https://github.com/juliushaertl/nextcloud-docker-dev/pull/87#discussion_r994408112.

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-13 11:55:19 +02:00
Baptiste Fotia 13a001965c Update README.md
I approve the change by @come-nc

Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2022-10-13 11:52:23 +02:00
Baptiste Fotia a0b2c1f45e docs(README): Fix markdown and add users test
I fixed of Markdown and I added others users test in the list.

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-13 10:32:13 +02:00
Baptiste Fotia 23f3cc9404 feature(bash): Use docker compose
Now, we can use docker compose and not docker-compose from docker 2.x.

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-12 16:46:24 +02:00
Baptiste Fotia dfe75ad54d docs(README):Rewrite README and reorganize the doc
I rewrite the README.md for readability and to attract the beginner
devs.

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
2022-10-12 16:06:49 +02:00
89 changed files with 3740 additions and 4538 deletions
-11
View File
@@ -1,11 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: "/docker/"
schedule:
interval: "daily"
+37 -79
View File
@@ -10,117 +10,75 @@ on:
jobs:
build:
push_to_registry:
name: Build image
runs-on: ubuntu-latest
if: github.repository == 'juliushaertl/nextcloud-docker-dev'
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
container:
- php81
- php80
- php74
- php73
- php72
- saml
- nginx
- elasticsearch
- mailhog
- ldap
- lookupserver
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: nextcloud-dev-${{ matrix.container }}
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ matrix.container }}-buildx-${{ github.sha }}
restore-keys: |
${{ matrix.container }}-buildx-
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Set dockerfile path
id: dockerfile
run: |
NAME="${{ matrix.container }}"
DOCKERFILE=$([[ -f "docker/$NAME/Dockerfile" ]] && echo "docker/$NAME/Dockerfile" || echo "docker/Dockerfile.$NAME")
echo "DOCKERFILE=$DOCKERFILE" >> $GITHUB_OUTPUT
- name: Build container image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v2
with:
push: false
context: docker/
platforms: ${{ matrix.platform }}
file: ${{ steps.dockerfile.outputs.DOCKERFILE }}
outputs: type=image,name=ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }},push-by-digest=true,name-canonical=true,push=true
- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
platforms: linux/amd64,linux/arm64
file: docker/Dockerfile.${{ matrix.container }}
tags: |
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Push container image
uses: docker/build-push-action@v2
if: github.ref == 'refs/heads/master'
with:
context: .
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
- name: Export digest
push: true
context: docker/
platforms: linux/amd64,linux/arm64
file: docker/Dockerfile.${{ matrix.container }}
tags: |
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Move cache
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v3
with:
name: digests
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
merge:
runs-on: ubuntu-latest
needs:
- build
strategy:
matrix:
container:
- php80
steps:
- name: Download digests
uses: actions/download-artifact@v3
with:
name: digests
path: /tmp/digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: nextcloud-dev-${{ matrix.container }}
- name: Login to GitHub Container Registry
if: needs.prepare.outputs.push == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ steps.meta.outputs.name }} :${{ steps.meta.outputs.version }}
+1 -1
View File
@@ -11,6 +11,6 @@ jobs:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
+16 -37
View File
@@ -1,44 +1,25 @@
SHELL := /bin/bash
.PHONY: images docker-build pull-all
.PHONY: images
.ONESHELL:
images: docker/*/Dockerfile docker/Dockerfile.*
.ONESHELL:
pull-all:
images:
for file in $$(find docker/ -maxdepth 1 -type f -iname 'Dockerfile.*'); do \
NAME=$$(echo $$file | sed 's/^.*\.//'); \
echo "=> Pulling image $$NAME"; docker pull "ghcr.io/juliushaertl/nextcloud-dev-$${NAME}"; \
done
for file in $$(find docker -maxdepth 2 -type f -iname 'Dockerfile'); do \
NAME=$$(basename $$(dirname $$file)); \
echo "=> Pulling image $$NAME"; docker pull "ghcr.io/juliushaertl/nextcloud-dev-$${NAME}"; \
NAME=$$(echo $$file | sed 's/^.*\.//'); echo "=> Building image $$NAME"; \
(cd docker && docker build -t ghcr.io/juliushaertl/nextcloud-dev-$$NAME:latest -f Dockerfile.$$NAME .)
done
pull-installed:
docker image ls | grep juliushaertl/nextcloud-dev | cut -f 1 -d " "
docker image ls | grep juliushaertl/nextcloud-dev | cut -f 1 -d " " | xargs -L 1 docker pull
# Empty target to always build
docker-build:
docker/%/Dockerfile: docker-build
NAME=$$(basename $$(dirname $@)); \
echo "=> Building dockerfile" $@ as ghcr.io/juliushaertl/nextcloud-dev-$$NAME:latest; \
(cd docker && docker build -t ghcr.io/juliushaertl/nextcloud-dev-$$NAME:latest -f $$NAME/Dockerfile .)
docker/Dockerfile.%: docker-build
NAME=$$(echo $$(basename $@) | sed 's/^.*\.//'); \
echo "=> Building dockerfile" $@ as ghcr.io/juliushaertl/nextcloud-dev-$$NAME:latest; \
(cd docker && docker build -t ghcr.io/juliushaertl/nextcloud-dev-$$NAME:latest -f Dockerfile.$$NAME .)
.PHONY: pull
.ONESHELL:
pull:
for file in $$(find docker/ -maxdepth 1 -type f -iname 'Dockerfile.*'); do \
NAME=$$(echo $$file | sed 's/^.*\.//'); echo "=> Pulling image $$NAME"; docker pull "ghcr.io/juliushaertl/nextcloud-dev-$${NAME}"; \
done
check: dockerfilelint shellcheck
.ONESHELL:
dockerfilelint:
for file in $$(find docker/ -type f -iname 'Dockerfile.*' -maxdepth 1); do dockerfilelint $$file; done;
for file in $$(find docker -type f -iname 'Dockerfile' -maxdepth 2); do dockerfilelint $$file; done;
.ONESHELL:
shellcheck:
@@ -47,11 +28,9 @@ shellcheck:
.ONESHELL:
template-apply:
cat docker/Dockerfile.php.template | sed 's/php:8.2/php:7.1/' > docker/Dockerfile.php71
cat docker/Dockerfile.php.template | sed 's/php:8.2/php:7.2/' > docker/Dockerfile.php72
cat docker/Dockerfile.php.template | sed 's/php:8.2/php:7.3/' > docker/Dockerfile.php73
cat docker/Dockerfile.php.template | sed 's/php:8.2/php:7.4/' > docker/Dockerfile.php74
cat docker/Dockerfile.php.template | sed 's/php:8.2/php:8.0/' > docker/Dockerfile.php80
cat docker/Dockerfile.php.template | sed 's/php:8.2/php:8.1/' > docker/Dockerfile.php81
cat docker/Dockerfile.php.template | sed 's/php:8.2/php:8.2/' > docker/php82/Dockerfile
cat docker/Dockerfile.php.template | sed 's/php:8.2/php:8.3/' > docker/php83/Dockerfile
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
+118 -473
View File
@@ -1,527 +1,172 @@
# Nextcloud development environment on Docker Compose
# nextcloud-dev-docker-compose
Nextcloud development environment using docker-compose
Hi beginner developer ! 👋
**DO NOT USE THIS IN PRODUCTION** Various settings in this setup are considered insecure and default passwords and secrets are used all over the place
This project allows you to start developing a Nextcloud app or contribute to Nextcloud server.
Features
This project is very **modular** where you can add [features](#different-feature-you-can-use).
So, you can use this project for your development environment only.
- ☁ Nextcloud
- 🔒 Nginx proxy with SSL termination
- 💾 MySQL
- 💡 Redis
- 👥 LDAP with example user data
- ✉ Mailhog
- 🚀 Blackfire
- 📄 Collabora
**DO NOT USE THIS IN PRODUCTION** Various settings in this setup are considered insecure and default passwords and secrets are used all over the place.
If you don't know how to install Docker, please, read this tutorial by Daphne Muller: https://cloud.nextcloud.com/s/iyNGp8ryWxc7Efa
Be careful : Read the "README.md" of the tutorial written by Daphne Muller first.
## Standalone containers
## Getting started 🎮
::: tip
This is a very simple way but doesn't cover all features. If you are looking for a fully featured setup you may skip to the next section
:::
There is a standalone version of the Nextcloud containers available that can be used to run Nextcloud without the other services. This is useful if you are just wanting to get started with app development against a specific server version, or to just have a quick way to develop, test or debug.
These containers support automatic fetching of the server source code and use SQLite as the database. The server source code is fetched from the official Nextcloud server repository and the version can be specified using the `NEXTCLOUD_VERSION` environment variable. The default version is `master`.
Running the containers does not need this repository to be cloned.
Example for running a Nextcloud server from the master branch of server:
First, get the setup running:
```bash
docker run --rm -p 8080:80 ghcr.io/juliushaertl/nextcloud-dev-php80:latest
```
For app development you can mount your app directly into the container:
```bash
docker run --rm -p 8080:80 -v ~/path/to/appid:/var/www/html/apps-extra/appid ghcr.io/juliushaertl/nextcloud-dev-php80:latest
```
The `SERVER_BRANCH` environment variable can be used to run different versions of Nextcloud by specificing either a server branch or git tag.
```bash
docker run --rm -p 8080:80 -e SERVER_BRANCH=v24.0.1 ghcr.io/juliushaertl/nextcloud-dev-php80:latest
```
You can also mount your local server source code into the container to run a local version of Nextcloud:
```bash
docker run --rm -p 8080:80 -e SERVER_BRANCH=v24.0.1 -v /tmp/server:/var/www/html ghcr.io/juliushaertl/nextcloud-dev-php80:latest
```
## Simple master setup
The easiest way to get the setup running the ```master``` branch is by running the ```bootstrap.sh``` script:
```
git clone https://github.com/juliushaertl/nextcloud-docker-dev
cd nextcloud-docker-dev
./bootstrap.sh
sudo sh -c "echo '127.0.0.1 nextcloud.local' >> /etc/hosts"
docker-compose up nextcloud proxy
docker compose up nextcloud proxy
```
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
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin
Ok, let's go to understand these commands line !
This may take some time depending on your internet connection speed.
First, you download the project with the git command, then you move to the `nextcloud-docker-dev` folder.
## Additional apps
The `bootstrap.sh` script check if all requirements are present and prepares your workspace.
You have the `./workspace` folder where there is the `server` folder, the Nextcloud's core and [other Nextcloud versions](docs/running-stable-versions.md) if you want (the stable21, stable22, stable23, and so on).
To install additional apps add them to the bootstrap command:
So, you if you want to contribute to the Nextcloud's core, you can work in this folder directly !
Then, you add `nextcloud.local` to your hosts file.
Finally, the `docker compose up nextcloud proxy` command line. This command line runs the nextcloud, proxy, redis and mailhog containers.
Once here, you can read the [First connection](#first-connection) section after seeing this result in your terminal :
```bash
./bootstrap.sh circles contacts
nextcloud-nextcloud-1 | The user "alice" was created successfully
nextcloud-nextcloud-1 | The user "user6" was created successfully
nextcloud-nextcloud-1 | The user "user1" was created successfully
nextcloud-nextcloud-1 | The user "nextcloud" was created successfully
nextcloud-nextcloud-1 | The user "user3" was created successfully
nextcloud-nextcloud-1 | The user "user5" was created successfully
nextcloud-nextcloud-1 | The user "jane" was created successfully
nextcloud-nextcloud-1 | The user "john" was created successfully
nextcloud-nextcloud-1 | The user "bob" was created successfully
nextcloud-nextcloud-1 | The user "user4" was created successfully
nextcloud-nextcloud-1 | The user "user2" was created successfully
```
You can also do this after the initial bootstrap.
In this case it will clone the apps but not update the `.env` file.
If you want your apps to be installed in the Nextcloud instance by default
add them to the `NEXTCLOUD_AUTOINSTALL_APPS` variable in `.env`.
This result means that all users are created and you can try to log in with the admin account or [other users](#which-user-accounts-can-i-use).
## Complex setup
If you want to stop the services, you should use `Ctrl+C`. But, the containers are always running or presents.
In order to achieve a more complex dev environment with different branches of the server, follow the manual steps:
Look at the status of your containers with `docker compose ps` :
##### 1. Create a workspace folder and clone the server repository
```
mkdir workspace && cd workspace
git clone https://github.com/nextcloud/server.git
```bahs
$ docker compose ps
NAME COMMAND SERVICE STATUS PORTS
nextcloud-database-mysql-1 "docker-entrypoint.s…" database-mysql running 0.0.0.0:8212->3306/tcp, :::8212->3306/tcp
nextcloud-mail-1 "MailHog" mail running 1025/tcp, 8025/tcp
nextcloud-nextcloud-1 "/usr/local/bin/boot…" nextcloud exited (0)
nextcloud-proxy-1 "/app/docker-entrypo…" proxy exited (2)
nextcloud-redis-1 "docker-entrypoint.s…" redis running 6379/tcp
```
##### 2. The Nextcloud code base needs to be available including the [`3rdparty`](https://github.com/nextcloud/3rdparty) submodule:
```
cd server
git submodule update --init
pwd
```
The last command prints the path to the Nextcloud server directory.
Use it for setting the `REPO_PATH_SERVER` in the next step.
Since the viewer app is kind of required for Nextcloud server, you should also clone the viewer app:
```
cd apps
git clone https://github.com/nextcloud/viewer.git
```
##### 3. Environment variables
A `.env` file should be created in the repository root, to keep configuration default on the dev setup:
```
cp example.env .env
```
Replace `REPO_PATH_SERVER` with the path from above.
##### 4. Running different stable versions
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.
```
cd workspace/server
git worktree add ../stable23 stable23
```
As in the `server` folder, the `3rdparty` submodule is needed:
```
cd ../stable23
git submodule update --init
```
The same can be done for `stable24`, `stable25`... and so on.
Git worktrees can also be used to have a checkout of an apps stable branch within the server stable directory.
```
cd workspace/server/apps-extra/text
git worktree add ../../../stable23/apps-extra/text stable23
```
The viewer app should also be added to the stable worktrees:
```
cd workspace/server/apps/viewer
git worktree add ../../../stable25/apps/viewer stable25
```
- Use `apps/` for required apps (like `viewer`)
- Use `apps-extra/` for apps that support only one specific nextcloud version (like `talk`)
- Use `apps-shared/` for apps that support multiple nextcloud versions as this directory is shared between all containers
##### 5. Editing `/etc/hosts`
You can then add `stable23.local`, `stable24.local` and so on to your `/etc/hosts` file to access it.
```
sudo sh -c "echo '127.0.0.1 nextcloud.local' >> /etc/hosts"
```
##### 6. Setting the PHP version to be used
The Nextcloud instance is setup to run with PHP 7.2 by default.
If you wish to use a different version of PHP, set the `PHP_VERSION` `.env` variable.
The variable supports the following values:
- PHP 7.1: `71`
- PHP 7.2: `72`
- PHP 7.3: `73`
- PHP 7.4: `74`
- PHP 8.0: `80`
- PHP 8.1: `81`
##### 7. Starting the containers
- Minimum to run `master`: `docker-compose up proxy nextcloud` (nextcloud mysql redis mailhog)
- Start stable branches: `docker-compose up stable23 proxy`
- Start full setup: `docker-compose up`
##### 8. Switching between stable versions and master
Remove all relevant containers and volumes:
`docker-compose down -v`
Start master or the branch you want to run:
`docker-compose up stable23 proxy`
## Running into errors
- If your setup isn't working and you can not figure out the reason why, running
`docker-compose down -v` will remove the relevant containers and volumes,
allowing you to run `docker-compose up` again from a clean slate.
- Sometimes it might help: `docker pull ghcr.io/juliushaertl/nextcloud-dev-php74:latest`
- In extreme cases, clean everything: `docker system prune --all`
- If you start your stable containers (not the master) and it wants to install Nextcloud even if it is not the first start, you may have removed the configuration with the last `docker-compose down` command. Try to use `docker-compose stop` instead or give the stable setup named values yourself.
## 🔒 Reverse Proxy
Used for SSL termination. To setup SSL support provide a proper `DOMAIN_SUFFIX` environment variable and put the certificates to `./data/ssl/` named by the domain name.
You might need to add the domains to your `/etc/hosts` file:
```
127.0.0.1 nextcloud.local
127.0.0.1 collabora.local
```
This is assuming you have set `DOMAIN_SUFFIX=.local`
To update the hosts file automatically you can use the `update-hosts` script:
```
./scripts/update-hosts
```
You can generate self-signed certificates using:
```
cd data/ssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nextcloud.local.key -out nextcloud.local.crt
```
You can also override the default port used for HTTP and HTTPS bound on the host for the proxy by setting these environment variables in the `.env` file (don't forget to recreate the containers):
```
PROXY_PORT_HTTP=8080
PROXY_PORT_HTTPS=4443
```
### dnsmasq to resolve wildcard domains
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=.local`:
```
address=/.local/127.0.0.1
```
To run dnsmasq in a container, you can use the following example:
```
docker run --rm -it \
-e DMQ_DHCP_RANGES=" " \
-e DMQ_DHCP_DNS=" " \
-e DMQ_DHCP_GATEWAY=" " \
-e DMQ_DNS_ADDRESS="address=/.local/127.0.0.1" \
-p 53:53 \
-p 53:53/udp \
drpsychick/dnsmasq:latest
```
### Use DNS Service Discovery on MacOS
You can also use the `dns-sd` tool on MacOS to advertise the container domains on the network. This is especially useful if you try to connect from an iPhone or iPad, since those devices do not allow to edit the `/etc/hosts` file. Use the tool like this:
```
dns-sd -P nextcloud _http._tcp local 80 nextcloud.local 192.168.0.10
```
Be aware that since this is advertised in the local network, it is not recommended to use it in a network where multiple instances could be running. In this case you might want to change the `DOMAIN_SUFFIX` in `.env` to prevent any collision.
### Use valid certificates trusted by your system
* Install [mkcert](https://github.com/FiloSottile/mkcert)
* Go to `data/ssl`
* `mkcert -cert-file nextcloud.local.crt -key-file nextcloud.local.key nextcloud.local`
* `docker-compose restart proxy`
## ✉ Mail
Sending/receiving mail can be tested with [mailhog](https://github.com/mailhog/MailHog) which is available on ports 1025 (SMTP).
To use the webui, add `127.0.0.1 mail.local` to your `/etc/hosts` and open [mail.local](http://mail.local).
## 🚀 Blackfire
Blackfire needs to use a hostname/ip that is resolvable from within the Blackfire container. Their free version is [limited to local profiling](https://support.blackfire.io/troubleshooting/hack-edition-users-cannot-profile-non-local-http-applications) so we need to browse Nextcloud though its local docker IP or add the hostname to `/etc/hosts`.
By default the PHP module for Blackfire is disabled, but you can enable or disable this through the following script:
```
./scripts/php-mod-config nextcloud blackfire on
```
After that you can use Blackfire through the browser plugin or curl as described below.
### Using with curl
```
alias blackfire='docker-compose exec -e BLACKFIRE_CLIENT_ID=$BLACKFIRE_CLIENT_ID -e BLACKFIRE_CLIENT_TOKEN=$BLACKFIRE_CLIENT_TOKEN blackfire blackfire'
blackfire curl http://192.168.21.8/
```
## Xdebug
Xdebug is shipped but disabled by default. It can be turned on by running:
```
./scripts/php-mod-config nextcloud xdebug.mode debug
```
### Debugging cron, occ or other command line scripts
```
docker compose exec nextcloud bash
# use this if you have configured path mapping in PHPstorm to match the server name configured
export PHP_IDE_CONFIG=serverName=localhost
sudo -E -u www-data php -dxdebug.mode=debug -dxdebug.client_host=host.docker.internal -dxdebug.start_with_request=yes -dxdebug.idekey=PHPSTORM occ
```
## 👥 LDAP
The LDAP sample data is based on https://github.com/rroemhild/docker-test-openldap and extended with randomly generated users/groups. For details see [data/ldap-generator/](https://github.com/juliushaertl/nextcloud-docker-dev/tree/master/data/ldap-generator). LDAP will be configured automatically if the ldap container is available during installation.
Example users are: `leela fry bender zoidberg hermes professor`. The password is the same as the uid.
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`
- Clone, build and enable the [richdocuments](https://github.com/nextcloud/richdocuments) app
- 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](https://github.com/nextcloud/richdocuments) 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 ONLYOFFICE 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
## Talk HPB
- Make sure to have the signaling hostname setup in your `/etc/hosts` file: `127.0.0.1 talk-signaling.local`
- Automatically enable for one of your containers (e.g. the main `nextcloud` one):
- Run `./scripts/enable-talk-hpb.sh nextcloud`
- Manual setup
- Start the talk signaling server and janus in addition to your other containers `docker-compose up -d talk-signaling talk-janus`
- Go to the admin settings of talk and add the signaling server (`http://talk-signaling.local` with shared secret `1234`)
## Antivirus
To down your containers, use the `docker compose down -v` command :
```bash
docker-compose up -d proxy nextcloud av
```
The [ClamAV](https://www.clamav.net/) antivirus will then be exposed as a daemon with host `nextav` and
port `3310`.
## SAML
```
docker-compose up -d proxy nextcloud saml
```
- uid mapping: `urn:oid:0.9.2342.19200300.100.1.1`
- idp entity id: `https://sso.local.dev.bitgrid.net/simplesaml/saml2/idp/metadata.php`
- Single Sign-On (SSO) service url: `https://sso.local.dev.bitgrid.net/simplesaml/saml2/idp/SSOService.php`
- single log out service url: `https://sso.local.dev.bitgrid.net/simplesaml/saml2/idp/SingleLogoutService.php`
- use certificate from `docker/configs/var-simplesamlphp/cert/example.org.crt`
```
-----BEGIN CERTIFICATE-----
MIICrDCCAhWgAwIBAgIUNtfnC2jE/rLdxHCs2th3WaYLryAwDQYJKoZIhvcNAQEL
BQAwaDELMAkGA1UEBhMCREUxCzAJBgNVBAgMAkJZMRIwEAYDVQQHDAlXdWVyemJ1
cmcxFDASBgNVBAoMC0V4YW1wbGUgb3JnMSIwIAYDVQQDDBlzc28ubG9jYWwuZGV2
LmJpdGdyaWQubmV0MB4XDTE5MDcwMzE0MjkzOFoXDTI5MDcwMjE0MjkzOFowaDEL
MAkGA1UEBhMCREUxCzAJBgNVBAgMAkJZMRIwEAYDVQQHDAlXdWVyemJ1cmcxFDAS
BgNVBAoMC0V4YW1wbGUgb3JnMSIwIAYDVQQDDBlzc28ubG9jYWwuZGV2LmJpdGdy
aWQubmV0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHPZwU+dAc76yB6bOq
0AkP1y9g7aAi1vRtJ9GD4AEAsA3zjW1P60BYs92mvZwNWK6NxlJYw51xPak9QMk5
qRHaTdBkmq0a2mWYqh1AZNNgCII6/VnLcbEIgyoXB0CCfY+2vaavAmFsRwOMdeR9
HmtQQPlbTA4m5Y8jWGVs1qPtDQIDAQABo1MwUTAdBgNVHQ4EFgQUeZSoGKeN5uu5
K+n98o3wcitFYJ0wHwYDVR0jBBgwFoAUeZSoGKeN5uu5K+n98o3wcitFYJ0wDwYD
VR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOBgQA25X/Ke+5dw7up8gcF2BNQ
ggBcJs+SVKBmPwRcPQ8plgX4D/K8JJNT13HNlxTGDmb9elXEkzSjdJ+6Oa8n3IMe
vUUejXDXUBvlmmm+ImJVwwCn27cSfIYb/RoZPeKtned4SCzpbEO9H/75z3XSqAZS
Z1tiHzYOVtEs4UNGOtz1Jg==
-----END CERTIFICATE-----
```
- cn `urn:oid:2.5.4.3`
- email `urn:oid:0.9.2342.19200300.100.1.3`
### Environment-based SSO
A simple approach to test environment-based SSO with the `user_saml` app is to use Apache's basic auth with the following configuration:
```
<Location /login>
AuthType Basic
AuthName "SAML"
AuthUserFile /var/www/html/.htpasswd
Require valid-user
</Location>
<Location /index.php/login>
AuthType Basic
AuthName "SAML"
AuthUserFile /var/www/html/.htpasswd
Require valid-user
</Location>
<Location /index.php/apps/user_saml/saml/login>
AuthType Basic
AuthName "SAML"
AuthUserFile /var/www/html/.htpasswd
Require valid-user
</Location>
<Location /apps/user_saml/saml/login>
AuthType Basic
AuthName "SAML"
AuthUserFile /var/www/html/.htpasswd
Require valid-user
</Location>
```
## [Fulltextsearch](https://github.com/nextcloud/fulltextsearch)
```
docker-compose up -d elasticsearch elasticsearch-ui
```
- Address for configuring in Nextcloud: `http://elastic:elastic@elasticsearch:9200`
- Address to access Elasticsearch from outside: `http://elastic:elastic@elasticsearch.local`
- Address for accessing the UI: http://elasticsearch-ui.local/
`sudo sysctl -w vm.max_map_count=262144`
foo@bar:~/Documents/codes/nextcloud-docker-dev$ docker compose down -v
[+] Running 16/5
⠿ Container nextcloud-nextcloud-1 Removed 0.0s
⠿ Container nextcloud-proxy-1 Removed 0.0s
⠿ Container nextcloud-mail-1 Removed 0.6s
#...
foo@bar:~/Documents/codes/nextcloud-docker-dev$
```
## Object storage
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.
Once you understand the mechanisms, you could run your containers in the background with the `-d` flag.
```bash
docker-compose up proxy nextcloud minio
foo@bar:~/Documents/codes/nextcloud-docker-dev$ docker compose up -d proxy nextcloud
[+] Running 12/1
⠿ Network nextcloud_default Created 0.2s
⠿ Volume "nextcloud_postgres" Created 0.0s
⠿ Volume "nextcloud_mysql" Created 0.0s
⠿ Volume "nextcloud_smb" Created 0.0s
⠿ Volume "nextcloud_clam" Created 0.0s
⠿ Volume "nextcloud_document_data" Created 0.0s
#...
foo@bar:~/Documents/codes/nextcloud-docker-dev$
```
## Development
The difference with the `-d` flag is you can use your currently prompt after run the `docker compose` command.
### OCC
## First connection
Run inside of the Nextcloud container:
```
set XDEBUG_CONFIG=idekey=PHPSTORM
sudo -E -u www-data php -dxdebug.remote_host=192.168.21.1 occ
```
After running the `docker compose up nextcloud proxy` command, you have to wait a few minutes before trying to connect to your development instance.
### Useful commands
In fact, you will see that the `nextcloud` and `proxy` containers initialize your Nextcloud, create user accounts, and so on. Step by step.
- Restart Apache to reload php configuration without a full container restart: `docker-compose kill -s USR1 nextcloud`
- Access to MySQL console: `mysql -h $(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nextcloud_database-mysql_1) -P 3306 -u nextcloud -pnextcloud`
- Run an LDAP search: `ldapsearch -x -H ldap://$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nextcloud_ldap_1) -D "cn=admin,dc=planetexpress,dc=com" -w admin -b "dc=planetexpress,dc=com" -s subtree <filter> <attrs>`
Then, once these steps are completed, you can connect to your development instance. You must enter `http://nextcloud.local` in your address bar!
## [Keycloak](https://www.keycloak.org/)
In fact, with the `proxy` container you don't need to specify the port number and you can't use `http://localhost` or `http://127.0.0.1`. Just, you have to use this address : `http://nextcloud.local`.
- Keycloak is using LDAP as a user backend (make sure the LDAP container is also running)
- `occ user_oidc:provider Keycloak -c nextcloud -s 09e3c268-d8bc-42f1-b7c6-74d307ef5fde -d http://keycloak.dev.local/auth/realms/Example/.well-known/openid-configuration`
- http://keycloak.dev.local/auth/realms/Example/.well-known/openid-configuration
- nextcloud
- 09e3c268-d8bc-42f1-b7c6-74d307ef5fde
## Global scale
### Which user accounts can I use ?
```
docker-compose up -d proxy portal gs1 gs2 lookup database-mysql
```
Here is a list of user accounts you can use :
Users are named the same as the instance name, e.g. `gs1`, `gs2`
| uid | password |
|:---:|:---:|
| admin | admin |
| user1 | user1 |
| user2 | user2 |
| user3 | user3 |
| user4 | user4 |
| user5 | user5 |
| user6 | user6 |
| nextcloud | nextcloud |
| alice | alice |
| bob | bob |
| jane | jane |
| john | john |
## Imaginary
## Where can I add my app for development ?
Enable the imaginary server for generating previews
Once you have ran the Nextcloud's server with `docker compose`. You can clone your app in this folder : `./workspace/server/apps-extra/`.
```bash
docker-compose up proxy nextcloud previews_hpb
./scripts/enable-preview-imaginary.sh
```
Of course, you should adapt to the nextcloud release you are using (server, stable23, stable24, and so on.).
## PhpMyAdmin
If you need to access the database, you can startup the `phpmyadmin` container that is already prepared.
```
docker-compose up -d phpmyadmin
```
Just add the domain to your `/etc/hosts` file and give it a try.
If you have not yet generated an app, you can do so from this web page : [https://apps.nextcloud.com/developer/apps/generate](https://apps.nextcloud.com/developer/apps/generate).
```
sudo sh -c "echo '127.0.0.1 phpmyadmin.local' >> /etc/hosts"
```
## pgAdmin
If you need to access the database and you are running PostgreSQL, you can use this additional container.
## Going further
```
docker-compose up -d pgadmin
```
If you want to go further, you can add new features or customize your development environment by following this documentation : [Configure my environment](docs/manual-setup.md#copy-environment-variables).
Add the domain to your `/etc/hosts` file:
If you use **XDEBUG** to debug your PHP code. Please, read the [Set Up Xdebug](docs/setup-xdebug.md) documentation.
```
sudo sh -c "echo '127.0.0.1 pgadmin.local' >> /etc/hosts"
```
If you want to set up the Nextcloud's core, please, read the [Manual setup](docs/manual-setup.md) documentation.
After you have started the container open `pgadmin.local` in a web browser. The password for the `nextcloud.local` is `postgres`.
That's it, open the following path to see the Nextcloud tables: `Server group 1 -> nextcloud.local -> Databases -> nextcloud -> Schemas -> public -> Tables`
If you aren't comfortable with Docker or other tools from the various containers (ldap, mysql, and so on.). You can read the [Useful commands](docs/useful-commands.md) file with some tips.
If you encounter any problems, please, look at this documentation : [Troubleshooting](docs/troubleshooting.md).
### Different feature you can use
These are features where you can use :
- ☁ Nextcloud
- 🔒 [Nginx proxy with SSL termination](docs/containers/ssl.md)
- 💾 [MySQL](docs/containers/mysql.md)
- 💡 Redis
- 👥 [LDAP with example user data](docs/containers/ldap.md)
- ✉ [Mailhog](docs/containers/mail.md)
- 🚀 [Blackfire](docs/containers/blackfire.md)
- 📄 [Collabora](docs/containers/collabora.md)
- 📄 [Only Office](docs/containers/onlyoffice.md)
- 👥 [SAML](docs/containers/saml.md)
- 🔍 [Full Text Search](docs/containers/fulltextsearch.md)
- 🪣 [Object Storage](docs/containers/objectstorage.md)
- 💉 [Antivirus](docs/containers/antivirus.md)
- 🔑 [Keycloak](docs/containers/keycloak.md)
- [Global Scale](docs/containers/globalscale.md)
- [Imaginary](docs/containers/imaginary.md)
+29 -49
View File
@@ -4,13 +4,6 @@ set -o errexit
set -o nounset
set -o pipefail
APPS_TO_INSTALL=(viewer recommendations files_pdfviewer profiler hmr_enabler)
NEXTCLOUD_AUTOINSTALL_APPS=(viewer profiler hmr_enabler)
# You can specify additional apps to install on the command line.
APPS_TO_INSTALL+=( "$@" )
NEXTCLOUD_AUTOINSTALL_APPS+=( "$@" )
indent() {
sed 's/^/ /'
}
@@ -23,30 +16,10 @@ indent_cli() {
fi
}
function install_server() {
if [ -d workspace/server/.git ]; then
echo "🆗 Server is already installed." | indent
return
fi
mkdir -p workspace/
(
(
echo "🌏 Fetching server (this might take a while to finish)" &&
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
}
function install_app() {
TARGET=workspace/server/apps-extra/"$1"
if [ -d "$TARGET"/.git ]; then
echo "🆗 App $1 is already installed." | indent
return
fi
(
echo "🌏 Fetching $1"
(git clone https://github.com/nextcloud/"$1".git "$TARGET" 2>&1 | indent_cli &&
(git clone https://github.com/nextcloud/"$1".git workspace/server/apps-extra/"$1" 2>&1 | indent_cli &&
echo "$1 installed") ||
echo "❌ Failed to install $1"
) | indent
@@ -67,42 +40,51 @@ echo
echo "⏩ Performing system checks"
is_installed docker
is_installed docker-compose
is_installed git
(
(
(docker ps 2>&1 >/dev/null && echo "✅ Docker is properly executable") ||
(echo "❌ Cannot run docker ps, you might need to check that your user is able to use docker properly" && exit 1)
) | indent
echo
echo "⏩ Setting up folder structure and fetching repositories"
install_server
mkdir -p workspace/server/apps-extra
for app in "${APPS_TO_INSTALL[@]}"
do
install_app "$app"
done
mkdir -p workspace/
(
(
echo "🌏 Fetching server (this might take a while to finish)" &&
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
mkdir -p workspace/server/apps-extra
install_app viewer
install_app recommendations
install_app files_pdfviewer
install_app profiler
echo
echo
echo "⏩ Setup your environment in an .env file"
if [ ! -f ".env" ]; then
cat <<EOT >.env
COMPOSE_PROJECT_NAME=master
PROTOCOL=http
COMPOSE_PROJECT_NAME=nextcloud
DOMAIN_SUFFIX=.local
REPO_PATH_SERVER=$PWD/workspace/server
ADDITIONAL_APPS_PATH=$PWD/workspace/server/apps-extra
STABLE_ROOT_PATH=$PWD/workspace
NEXTCLOUD_AUTOINSTALL_APPS="${NEXTCLOUD_AUTOINSTALL_APPS[@]}"
NEXTCLOUD_AUTOINSTALL_APPS="viewer profiler"
DOCKER_SUBNET=192.168.21.0/24
PORTBASE=821
PHP_XDEBUG_MODE=develop
# SQL variant to use, possible values: sqlite, mysql, pgsql
SQL=mysql
DB_SERVICE=database-mysql
# other values: "database-postgres"
EOT
fi
@@ -122,17 +104,17 @@ cat <<EOF
🚀 Start the Nextcloud server by running
$ docker-compose up -d nextcloud
$ docker compose up -d nextcloud
💤 Stop it with
$ docker-compose stop nextcloud
$ docker compose stop nextcloud
🗑 Fresh install and wipe all data
$ docker-compose down -v
$ docker compose down -v
Note that for performance reasons the server repository has been cloned with
@@ -140,8 +122,6 @@ cat <<EOF
$ cd workspace/server
$ git fetch --unshallow
$ git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
$ git fetch origin
This may take some time depending on your internet connection speed.
+1
View File
@@ -39,6 +39,7 @@ if ($primary === 'minio-multibucket') {
// 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',
-1
View File
@@ -1 +0,0 @@
nextcloud.local:5432:database-postgres:postgres:postgres
-14
View File
@@ -1,14 +0,0 @@
{
"Servers": {
"1": {
"Name": "nextcloud.local",
"Group": "Server Group 1",
"Port": 5432,
"Username": "postgres",
"Host": "database-postgres",
"SSLMode": "prefer",
"MaintenanceDB": "postgres",
"PassFile": "/pgadmin4/config/pgpassfile"
}
}
}
-40
View File
@@ -1,40 +0,0 @@
# Keycloak SAML test setup
Currently the Keycloak realm only supports the main instance (nextcloud.local). For other instances this would need a separate realm and adjusting the imported realm in `docker/configs/keycloak`.
Setup can be done automatically through:
```bash
occ saml:config:create
occ saml:config:set \
--general-idp0_display_name "Keycloak SAML" \
--general-uid_mapping "username" \
--idp-entityId "http://keycloak.local/realms/Example" \
--idp-singleLogoutService.url "http://keycloak.local/realms/Example/protocol/saml" \
--idp-singleSignOnService.url "http://keycloak.local/realms/Example/protocol/saml" \
--idp-x509cert="$(cat keycloak.crt)" \
--security-authnRequestsSigned 1 \
--security-logoutRequestSigned 1 \
--security-logoutResponseSigned 1 \
--security-wantAssertionsEncrypted 0 \
--security-wantAssertionsSigned 1 \
--security-wantMessagesSigned 1 \
--security-nameIdEncrypted 0 --security-wantNameId 0 \
--security-wantNameIdEncrypted 0 \
--sp-x509cert="$(cat public.cert)" \
--sp-privateKey="$(cat private.key)" \
"1"
```
## References
- Setup keycloak for SAML usage: https://janikvonrotz.ch/2020/04/21/configure-saml-authentication-for-nextcloud-with-keycloack/
## Generate keys for Nextcloud
openssl req -nodes -new -x509 -keyout private.key -out public.crt
## update keycloak from example realm
nc-dev exec keycloak /opt/keycloak/bin/kc.sh export --realm Example --users skip --dir /opt/keycloak/data/import
-3
View File
@@ -1,3 +0,0 @@
-----BEGIN CERTIFICATE-----
MIICnTCCAYUCBgGFAJ9a7jANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdFeGFtcGxlMB4XDTIyMTIxMTA5NTcwMVoXDTMyMTIxMTA5NTg0MVowEjEQMA4GA1UEAwwHRXhhbXBsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJv17u7hBOhwsRmlylApsmRplV1qPrliFmiOenUZSYwdkAtIu9Cu00BBx6FqmUnaTrMzprrjw1Kv8ADifmeT4m4ICul+nClici29o0eVh9a3dbYUZoyruXEEPd3mWVCXebkTfqA7AI8hVGHXk9R23PakQdrGJHoe1QSH3Vk41NyQbYZ5+U4gvnQqmaMgrYFtubQsS4ZdqzrkG5Ry0OigpWjOGT6dnSB0/AttN7pIfnaBGzmgIcQzBrW3c/9qhNuUBAhP3AKwYt/HptOfFkh7atOqrksIelHyuLTqsuXSJ/vAEAuEib1ns8ggYWTTRI9ROvdoJ5kvVBzflSB5Cr10LrsCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAmi2oHhClIZIl/dwLxwVFaLZ7ZcHMLcQjytxrhQhl9i/xIByQXH5DXHtsmg1HcX8BET3Hrm7McxIspBOzHBxZPGLJlZwZ5aVzI6ZwMvy49rR5tbQlRppzM3VkT10P1ccIT6Cx9PtgL9BcgiPkRyzmhq3z10Ayd2PnY0G8Z0Lc7Qc6sXz9+DCFM6GkkvECPLlEdlagtYdQAH2om2qPaj1GjYY+QgvAuRmO04Biu2E/zhMvEG0KH+OgSHf6dTrcUhk0+nl2QRs7kueakRvn+Z6VXkwkcBokNq4+Ka6z9YmimrRv/CiWoLKIcYknHaNaP/PZI6joDcg3IgxWLOLWNHxTGw==
-----END CERTIFICATE-----
-28
View File
@@ -1,28 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDlz0NWHyNGjVCR
FXahaaxhrVTAmeViELJO3pUtiqpYwhxV+nqqRUfBa0KGYHA1bIuM41/OWwHQjwFt
opH5OYTTsqXicdVkq+5rYP+tKdJv0+S4puEAQsiLUgEWLpVfSmBIoyGGnU4hUCUR
NDySoo5cjmevRUbd5Rvt76hOcYEHPmQOfT3se3wf0fY1sDkcUTK82UAz+3LypLzp
atd5keVmwkJC1xtJ+hXdvwL9u0zRD/IJCE1JZK7+w5CqB3AUaVBiwbqHfgvxjPWm
WF8bZSErciJM9u7pbFO/lXTcpqRZBC/r80a6bVv0tAtEU+MSgWxXgPqQsIKCDHib
JwWgD9jpAgMBAAECggEBAK3xbFFSbjvnmJTIPyu7tYuVS7Igijvo0V3bIeT/sSJP
gm0dkx0wJTjke80ET8pQJ2xzab/iqIP4yib2xzBx9fTaoq68ZL23WVYTbFLgdfTI
2LVfMq0k33B8mG/2wH8I58nzF9wxUsLqS7Qy6qo+uiyaaSaD9DjeQn6dSLJfPT+B
7cG1lKJVnpMEmjCc8b7x7jB2wMIuGVHbNEm+FRe94S8wm+psb6q7eG7JF2PDqsJp
Hm+s0jhjwICS4rSTJ9gsg4YNAHx/xnWJn6nZiXh+mu5Irhb2kEQuE1xX1Fhy5GBI
qqij2kFAqjn8PZ+RMsH43ITTf17eVq/lMkqcaHJtwgECgYEA8tutP46emqtLgDnp
F82tFweQ+luQqohNcaIg4SOIh7eAik15lWYSYSSzsIpBcM9aVJ/ZdCrI9DD/Ba/n
jUfoSsPo8PYy59zuGaheUyiQpUva2NNUSGkwQ4aT5aVVyn0cksCCq3ZoQ8wmu1aK
JKgzRtQhkZMWOG8aJ+ie1s/PIKkCgYEA8j7TM6w1CELI6j/Xsb9VUr7m/GsU76CN
W4eu3yOq6KSkXw8RveYzcHxdyP1TNn10e0n21BjYCKr001q+xgfwUMYcxxpwi+H2
RXxyDwjXHmw5VVDXXH8uGHUFC2iYRENKTGmRV4EWc+XnRYk7O41/nsxMqPeBENhT
cfMAeZa23kECgYA/kwozTR5v1s+Y7Y/7Tzg0gyKMp1OjkLLVQF/jD+45uOvJSKa/
WU0OaREw8cBXy7AV3xKJunmIkxrvXjD7ZwuEJuzfx1NkJw2dYdnvYvsailTr1caG
fiLISn6E61cd/spwED0krYZ12Qd6mxjmp7FkpTt0ZFC4zTzHnbmW+id6oQKBgGDB
NxosbgIeqqDlXwFfqnSiSyAGpRYQymUEjJQTavAA0qYlHrD6gREsm0jr5ZCeCygz
IqMUSTUtExxX4lq2UQXyGwxrQwib+AFI80WOAl3kXAH3iA0pvv+Fvb4QyMB7H/Hl
OGf65zzjVrwvU7k1iwOiFfxm3uYbgTjCFi56RBABAoGBAMpRrYBQ4qfVLtIMqnXH
xSPMN109PpG74ooyDSmnQutqKx+cnz6PWid+gK/KKZKdh5DG/ScVFCHGy+YqImnA
ein9E7+uV6mbOzMnQGKm2Q5vbuG/UWY7bLVoxMN0XS1PTMk/fCC75l1gX1BsO1UX
mBctbrmbnZ3Of6966dUuGXnS
-----END PRIVATE KEY-----
-17
View File
@@ -1,17 +0,0 @@
-----BEGIN CERTIFICATE-----
MIICvjCCAaYCCQDS+w+GXVpJsDANBgkqhkiG9w0BAQsFADAhMQswCQYDVQQGEwJE
RTESMBAGA1UECgwJZGV2LmxvY2FsMB4XDTIyMTIxMDA1MjgxMloXDTIzMDEwOTA1
MjgxMlowITELMAkGA1UEBhMCREUxEjAQBgNVBAoMCWRldi5sb2NhbDCCASIwDQYJ
KoZIhvcNAQEBBQADggEPADCCAQoCggEBAOXPQ1YfI0aNUJEVdqFprGGtVMCZ5WIQ
sk7elS2KqljCHFX6eqpFR8FrQoZgcDVsi4zjX85bAdCPAW2ikfk5hNOypeJx1WSr
7mtg/60p0m/T5Lim4QBCyItSARYulV9KYEijIYadTiFQJRE0PJKijlyOZ69FRt3l
G+3vqE5xgQc+ZA59Pex7fB/R9jWwORxRMrzZQDP7cvKkvOlq13mR5WbCQkLXG0n6
Fd2/Av27TNEP8gkITUlkrv7DkKoHcBRpUGLBuod+C/GM9aZYXxtlIStyIkz27uls
U7+VdNympFkEL+vzRrptW/S0C0RT4xKBbFeA+pCwgoIMeJsnBaAP2OkCAwEAATAN
BgkqhkiG9w0BAQsFAAOCAQEAOJ3+a1d06LN83gh3iNEvwWNudKVPi7MvyltW2WVB
zQBoN2wCYC0crl7PRxXqACvpw2nE2qZaJ0KrrbVWUVMf2lAwRKk4g2F3WcwBjqak
WwWEgIDuocLt1WX5nHbI6hb9E2jAwa8wpYbAiRQF5HnZGxI+1ZXKROZvhOPIiAVT
v4jTPGr5lgxJ1lKqnVRfKIHZlPWPFGTmuwSkuq+9lwqp/HdCOIiV54c5yi0XBMvE
jLhqoE5cxSVNswLF7thD7B2E1NTpyH83Z7rHtK/HDHinUVfOTKhnt15JAf2I2zwh
9HErW/Bz4zQlmmBL0uMpgOjTix9h55p2JMuM7/Bd7ng2Dg==
-----END CERTIFICATE-----
+76 -338
View File
@@ -7,8 +7,8 @@ services:
proxy:
image: ghcr.io/juliushaertl/nextcloud-dev-nginx:latest
ports:
- "${PROXY_PORT_HTTP:-80}:80"
- "${PROXY_PORT_HTTPS:-443}:443"
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./data/ssl/:/etc/nginx/certs
@@ -34,13 +34,7 @@ services:
- stable22${DOMAIN_SUFFIX}
- stable23${DOMAIN_SUFFIX}
- stable24${DOMAIN_SUFFIX}
- stable25${DOMAIN_SUFFIX}
- stable26${DOMAIN_SUFFIX}
- stable27${DOMAIN_SUFFIX}
- stable28${DOMAIN_SUFFIX}
- mail${DOMAIN_SUFFIX}
- collabora${DOMAIN_SUFFIX}
- codedev${DOMAIN_SUFFIX}
- onlyoffice${DOMAIN_SUFFIX}
- proxy${DOMAIN_SUFFIX}
- hpb${DOMAIN_SUFFIX}
@@ -52,9 +46,6 @@ services:
- lookup${DOMAIN_SUFFIX}
- elasticsearch${DOMAIN_SUFFIX}
- elasticsearch-ui${DOMAIN_SUFFIX}
- pgadmin${DOMAIN_SUFFIX}
- phpmyadmin${DOMAIN_SUFFIX}
- talk-signaling${DOMAIN_SUFFIX}
haproxy:
image: haproxy
@@ -66,7 +57,7 @@ services:
- ./docker/configs/haproxy.conf:/usr/local/etc/haproxy/haproxy.cfg:ro
nextcloud:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
environment:
SQL: ${SQL:-mysql}
NEXTCLOUD_AUTOINSTALL: "YES"
@@ -77,14 +68,11 @@ services:
NEXTCLOUD_TRUSTED_DOMAINS:
BLACKFIRE_CLIENT_ID:
BLACKFIRE_CLIENT_TOKEN:
PRIMARY: ${PRIMARY}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${REPO_PATH_SERVER}:/var/www/html'
- '${REPO_PATH_SERVER}/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/server}:/var/www/html'
- 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
@@ -95,18 +83,16 @@ services:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
- proxy
extra_hosts:
- host.docker.internal:host-gateway
nextcloud2:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
environment:
SQL: 'mysql'
VIRTUAL_HOST: "nextcloud2${DOMAIN_SUFFIX}"
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${REPO_PATH_SERVER}:/var/www/html'
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/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
@@ -116,18 +102,16 @@ services:
- database-mysql
- redis
- mail
- proxy
extra_hosts:
- host.docker.internal:host-gateway
nextcloud3:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
environment:
SQL: ${SQL:-mysql}
SQL: 'mysql'
VIRTUAL_HOST: "nextcloud3${DOMAIN_SUFFIX}"
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${REPO_PATH_SERVER}:/var/www/html'
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/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
@@ -136,412 +120,215 @@ services:
- database-mysql
- redis
- mail
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable16:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-72}:latest
environment:
SQL: ${SQL:-mysql}
SQL: 'sqlite'
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable16${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable16:/var/www/html'
- '${STABLE_ROOT_PATH}/stable16/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- '${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'
- /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
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable17:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-72}:latest
environment:
SQL: ${SQL:-mysql}
SQL: 'sqlite'
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable17${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable17:/var/www/html'
- '${STABLE_ROOT_PATH}/stable17/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- '${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'
- /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
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable18:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
environment:
SQL: ${SQL:-mysql}
SQL: 'sqlite'
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable18${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable18:/var/www/html'
- '${STABLE_ROOT_PATH}/stable18/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- '${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'
- /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
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable19:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-72}:latest
environment:
SQL: ${SQL:-mysql}
SQL: 'sqlite'
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable19${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable19:/var/www/html'
- '${STABLE_ROOT_PATH}/stable19/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- '${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'
- ./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
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable20:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-72}:latest
environment:
SQL: ${SQL:-mysql}
SQL: 'sqlite'
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable20${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable20:/var/www/html'
- '${STABLE_ROOT_PATH}/stable20/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- '${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'
- ./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
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable21:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-80}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
environment:
SQL: ${SQL:-mysql}
SQL: 'sqlite'
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable21${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PRIMARY: ${PRIMARY}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable21:/var/www/html'
- '${STABLE_ROOT_PATH}/stable21/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- '${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'
- ./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
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable22:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-80}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
environment:
SQL: ${SQL:-mysql}
SQL: 'sqlite'
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable22${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PRIMARY: ${PRIMARY}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable22:/var/www/html'
- '${STABLE_ROOT_PATH}/stable22/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- '${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'
- /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
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable23:
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: stable23${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PRIMARY: ${PRIMARY}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable23:/var/www/html'
- '${STABLE_ROOT_PATH}/stable23/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- /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
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable24:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-80}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
environment:
SQL: ${SQL:-mysql}
SQL: 'mysql'
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable24${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PRIMARY: ${PRIMARY}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable24:/var/www/html'
- '${STABLE_ROOT_PATH}/stable24/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable24:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/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
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable25:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
stable23:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-73}:latest
environment:
SQL: ${SQL:-mysql}
SQL: 'sqlite'
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
VIRTUAL_HOST: stable25${DOMAIN_SUFFIX}
VIRTUAL_HOST: stable23${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PRIMARY: ${PRIMARY}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable25:/var/www/html'
- '${STABLE_ROOT_PATH}/stable25/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- /var/www/html/data
- /var/www/html/config
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- '${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'
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable26:
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: stable26${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PRIMARY: ${PRIMARY}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable26:/var/www/html'
- '${STABLE_ROOT_PATH}/stable26/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- /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
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable27:
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: stable27${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PRIMARY: ${PRIMARY}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable27:/var/www/html'
- '${STABLE_ROOT_PATH}/stable27/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- /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
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
- proxy
extra_hosts:
- host.docker.internal:host-gateway
stable28:
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: stable28${DOMAIN_SUFFIX}
ADDITIONAL_APPS_PATH:
NEXTCLOUD_TRUSTED_DOMAINS:
PRIMARY: ${PRIMARY}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
volumes:
- '${STABLE_ROOT_PATH}/stable28:/var/www/html'
- '${STABLE_ROOT_PATH}/stable28/apps-extra:/var/www/html/apps-extra'
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
- /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
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
- proxy
extra_hosts:
- host.docker.internal:host-gateway
database-sqlite:
image: rwgrim/docker-noop
database-mysql:
image: mariadb:10.6
image: mariadb:10.5
environment:
MYSQL_ROOT_PASSWORD: 'nextcloud'
MYSQL_PASSWORD: 'nextcloud'
@@ -555,32 +342,14 @@ services:
database-postgres:
image: postgres:latest
environment:
POSTGRES_DB: nextcloud
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
expose:
- 5432
volumes:
- postgres:/var/lib/postgresql
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
VIRTUAL_HOST: "pgadmin${DOMAIN_SUFFIX}"
PGADMIN_DEFAULT_EMAIL: pgadmin4@nextcloud.local
PGADMIN_DEFAULT_PASSWORD: postgres
PGADMIN_CONFIG_SERVER_MODE: 'False'
PGADMIN_SERVER_JSON_FILE: /pgadmin4/config/servers.json
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'
volumes:
- "./data/pgadmin/config:/pgadmin4/config"
depends_on:
- proxy
redis:
image: redis:7
image: redis:6
ldap:
image: osixia/openldap
@@ -670,36 +439,22 @@ services:
aliasgroup2: http://gs1${DOMAIN_SUFFIX}
aliasgroup3: http://gs2${DOMAIN_SUFFIX}
aliasgroup4: http://stable20${DOMAIN_SUFFIX}
aliasgroup5: http://stable26${DOMAIN_SUFFIX}
aliasgroup5: http://stable21${DOMAIN_SUFFIX}
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=*${DOMAIN_SUFFIX} --o:home_mode.enable=true --o:ssl.termination=false ${COLLABORA_PARAMS:-}"
codedev:
privileged: true
build:
context: ./docker/codedev
environment:
VIRTUAL_HOST: "codedev${DOMAIN_SUFFIX}"
VIRTUAL_PORT: 9980
volumes:
- /Users/julius/repos/collaboraonline:/collabora
command: >
tail -f /dev/null
extra_params: "--o:ssl.enable=false --o:net.frame_ancestors=*${DOMAIN_SUFFIX}"
onlyoffice:
image: onlyoffice/documentserver:latest
image: ${CONTAINER_ONLYOFFICE:-onlyoffice/documentserver:latest}
environment:
VIRTUAL_HOST: onlyoffice${DOMAIN_SUFFIX}
USE_UNAUTHORIZED_STORAGE: "true"
expose:
- '80'
volumes:
@@ -710,10 +465,8 @@ services:
image: minio/minio
environment:
VIRTUAL_HOST: minio${DOMAIN_SUFFIX}
VIRTUAL_PORT: 9001
MINIO_ROOT_USER: nextcloud
MINIO_ROOT_PASSWORD: nextcloud
MINIO_BROWSER_REDIRECT_URL: http://minio${DOMAIN_SUFFIX}
volumes:
- objectstorage_minio:/data
command: server /data --console-address :9001
@@ -721,7 +474,7 @@ services:
elasticsearch:
build:
context: ./docker
dockerfile: elasticsearch/Dockerfile
dockerfile: Dockerfile.elasticsearch
environment:
- ELASTIC_PASSWORD=elastic
- discovery.type=single-node
@@ -755,29 +508,30 @@ services:
push:
image: ghcr.io/juliushaertl/nextcloud-dev-push:latest
image: icewind1991/notify_push
ports:
- '8191:80'
environment:
RUST_LOG: debug
VIRTUAL_HOST: push${DOMAIN_SUFFIX}
VIRTUAL_PORT: 7867
DATABASE_URL: mysql://root:nextcloud@database-mysql/nextcloud
VIRTUAL_PORT: 8191
DATABASE_URL: mysql://nextcloud:nextcloud@master_database-mysql_1/nextcloud
REDIS_URL: redis://redis
NEXTCLOUD_URL: http://nextcloud
NEXTCLOUD_URL: https://nextcloud.local.dev.bitgrid.net
keycloak:
image: quay.io/keycloak/keycloak:22.0
image: ${CONTAINER_KEYCLOAK:-quay.io/keycloak/keycloak:15.0.1}
expose:
- 8080
volumes:
- ./docker/configs/keycloak:/opt/keycloak/data/import
command: start-dev --import-realm
- ./docker/configs/keycloak:/tmp/keycloak
environment:
VIRTUAL_HOST: "keycloak${DOMAIN_SUFFIX}"
VIRTUAL_PORT: 8080
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
PROXY_ADDRESS_FORWARDING: "true"
KC_PROXY: edge
KEYCLOAK_IMPORT: /tmp/keycloak/realm-export.json
av:
image: mkodockx/docker-clamav:alpine
@@ -787,14 +541,14 @@ services:
- clam:/var/lib/clamav
portal:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
environment:
VIRTUAL_HOST: portal${DOMAIN_SUFFIX}
SQL: 'mysql'
GS_MODE: master
volumes:
- '${STABLE_ROOT_PATH}/server:/var/www/html'
- '${STABLE_ROOT_PATH}/server/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- ./data/skeleton/:/skeleton
@@ -809,14 +563,14 @@ services:
- host.docker.internal:host-gateway
gs1:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
environment:
VIRTUAL_HOST: gs1${DOMAIN_SUFFIX}
SQL: 'mysql'
GS_MODE: slave
volumes:
- '${STABLE_ROOT_PATH}/server:/var/www/html'
- '${STABLE_ROOT_PATH}/server/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- ./data/skeleton/:/skeleton
@@ -832,14 +586,14 @@ services:
- host.docker.internal:host-gateway
gs2:
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
environment:
VIRTUAL_HOST: gs2${DOMAIN_SUFFIX}
SQL: 'mysql'
GS_MODE: slave
volumes:
- '${STABLE_ROOT_PATH}/server:/var/www/html'
- '${STABLE_ROOT_PATH}/server/apps-extra:/var/www/html/apps-extra'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server:/var/www/html'
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server/apps-extra:/var/www/html/apps-extra'
- /var/www/html/data
- /var/www/html/config
- ./data/skeleton/:/skeleton
@@ -859,33 +613,17 @@ services:
environment:
VIRTUAL_HOST: "lookup${DOMAIN_SUFFIX}"
# volumes:
# - '${STABLE_ROOT_PATH}/lookupserver:/var/www/html'
# - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/lookupserver:/var/www/html'
extra_hosts:
- host.docker.internal:host-gateway
previews_hpb:
image: nextcloud/aio-imaginary:latest
image: h2non/imaginary
ports:
- "8088:8088"
environment:
- PORT=8088
talk-signaling:
image: strukturag/nextcloud-spreed-signaling:latest
environment:
VIRTUAL_HOST: "talk-signaling${DOMAIN_SUFFIX}"
HTTP_LISTEN: "0.0.0.0:80"
HASH_KEY: "11111111111111111111111111111111"
BLOCK_KEY: "22222222222222222222222222222222"
USE_JANUS: 1
JANUS_URL: "ws://talk-janus:8188"
SKIP_VERIFY: 1
BACKENDS_ALLOWALL: 1
BACKENDS_ALLOWALL_SECRET: "1234"
INTERNAL_SHARED_SECRET_KEY: "4567"
talk-janus:
image: ghcr.io/juliushaertl/nextcloud-dev-talk-janus:latest
volumes:
data:
@@ -1,3 +1,3 @@
FROM elasticsearch:7.17.14
FROM elasticsearch:7.17.3
RUN bin/elasticsearch-plugin install --batch ingest-attachment
@@ -3,4 +3,4 @@ FROM osixia/openldap:latest
ENV LDAP_DOMAIN="planetexpress.com"
ENV LDAP_BASE_DN="dc=planetexpress,dc=com"
COPY ./ldap/seed /container/service/slapd/assets/config/bootstrap/ldif/custom
COPY ./configs/ldap /container/service/slapd/assets/config/bootstrap/ldif/custom
@@ -1,11 +1,11 @@
FROM ubuntu:22.04
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV DBPASSWD=abrakadabra
ADD https://github.com/nextcloud/lookup-server/archive/master.zip /root/lookup-server.zip
COPY lookupserver/entrypoint.sh /usr/sbin/
COPY configs/lookupserver/entrypoint.sh /usr/sbin/
RUN echo 'mariadb-server mysql-server/root_password password $DBPASSWD' | debconf-set-selections && \
echo 'mariadb-server mysql-server/root_password_again password $DBPASSWD' | debconf-set-selections && \
@@ -30,8 +30,8 @@ RUN cd /root/ && \
rm lookup-server.zip && \
rm -Rf lookup-server-master
COPY lookupserver/config.php /var/www/html/config
COPY lookupserver/lookup.conf /etc/apache2/conf-available/
COPY configs/lookupserver/config.php /var/www/html/config
COPY configs/lookupserver/lookup.conf /etc/apache2/conf-available/
RUN a2enmod rewrite && \
a2enconf lookup && \
+5
View File
@@ -0,0 +1,5 @@
FROM nginxproxy/nginx-proxy:latest
RUN { \
echo 'server_tokens off;'; \
echo 'client_max_body_size 1024m;'; \
} > /etc/nginx/conf.d/my_proxy.conf
+54 -61
View File
@@ -1,49 +1,59 @@
FROM php:8.2-apache
FROM php:8.1-apache
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
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 chmod +x /usr/local/bin/install-php-extensions
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 install-php-extensions \
apcu \
bcmath \
blackfire \
exif \
gd \
gmp \
imagick \
intl \
ldap \
oci8 \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
redis \
smbclient \
sysvsem \
xdebug \
zip \
@composer
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
# dev tools separate install so we quickly change without rebuilding all php extenions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync \
&& rm -rf /var/lib/apt/lists/*
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN wget -O /usr/local/bin/phpunit8 https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x /usr/local/bin/phpunit8 \
&& wget -O /usr/local/bin/phpunit9 https://phar.phpunit.de/phpunit-9.phar \
&& chmod +x /usr/local/bin/phpunit9
# Install NVM (Fermium = v14, Gallium = v16)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install lts/gallium \
&& nvm install lts/fermium \
&& npm install -g npm@7
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
@@ -64,29 +74,13 @@ ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
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 \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini \
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini && \
mv $PHP_INI_DIR/conf.d/zz-blackfire.ini $PHP_INI_DIR/conf.d/zz-blackfire.ini.disabled) \
|| echo "Skipped blackfire as the installation failed" \
&& 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
# mod_rewrite
RUN a2enmod rewrite headers
# increase limit request body
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-available/limit-request-body.conf && a2enconf limit-request-body
VOLUME /var/www/html
VOLUME /var/www/html/apps-writable
VOLUME /var/www/html/config
VOLUME /var/www/html/data
ENV SQL sqlite
ENV NEXTCLOUD_AUTOINSTALL YES
ENV WITH_REDIS NO
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
@@ -94,6 +88,5 @@ WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD data/installing.html /root/installing.html
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php configs/apcu.config.php /root/
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/
+53 -60
View File
@@ -1,49 +1,59 @@
FROM php:7.1-apache
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
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 chmod +x /usr/local/bin/install-php-extensions
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 install-php-extensions \
apcu \
bcmath \
blackfire \
exif \
gd \
gmp \
imagick \
intl \
ldap \
oci8 \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
redis \
smbclient \
sysvsem \
xdebug \
zip \
@composer
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
# dev tools separate install so we quickly change without rebuilding all php extenions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync \
&& rm -rf /var/lib/apt/lists/*
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN wget -O /usr/local/bin/phpunit8 https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x /usr/local/bin/phpunit8 \
&& wget -O /usr/local/bin/phpunit9 https://phar.phpunit.de/phpunit-9.phar \
&& chmod +x /usr/local/bin/phpunit9
# Install NVM (Fermium = v14, Gallium = v16)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install lts/gallium \
&& nvm install lts/fermium \
&& npm install -g npm@7
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
@@ -64,29 +74,13 @@ ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
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 \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini \
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini && \
mv $PHP_INI_DIR/conf.d/zz-blackfire.ini $PHP_INI_DIR/conf.d/zz-blackfire.ini.disabled) \
|| echo "Skipped blackfire as the installation failed" \
&& 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
# mod_rewrite
RUN a2enmod rewrite headers
# increase limit request body
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-available/limit-request-body.conf && a2enconf limit-request-body
VOLUME /var/www/html
VOLUME /var/www/html/apps-writable
VOLUME /var/www/html/config
VOLUME /var/www/html/data
ENV SQL sqlite
ENV NEXTCLOUD_AUTOINSTALL YES
ENV WITH_REDIS NO
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
@@ -94,6 +88,5 @@ WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD data/installing.html /root/installing.html
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php configs/apcu.config.php /root/
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/
+53 -60
View File
@@ -1,49 +1,59 @@
FROM php:7.2-apache
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
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 chmod +x /usr/local/bin/install-php-extensions
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 install-php-extensions \
apcu \
bcmath \
blackfire \
exif \
gd \
gmp \
imagick \
intl \
ldap \
oci8 \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
redis \
smbclient \
sysvsem \
xdebug \
zip \
@composer
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
# dev tools separate install so we quickly change without rebuilding all php extenions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync \
&& rm -rf /var/lib/apt/lists/*
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN wget -O /usr/local/bin/phpunit8 https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x /usr/local/bin/phpunit8 \
&& wget -O /usr/local/bin/phpunit9 https://phar.phpunit.de/phpunit-9.phar \
&& chmod +x /usr/local/bin/phpunit9
# Install NVM (Fermium = v14, Gallium = v16)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install lts/gallium \
&& nvm install lts/fermium \
&& npm install -g npm@7
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
@@ -64,29 +74,13 @@ ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
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 \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini \
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini && \
mv $PHP_INI_DIR/conf.d/zz-blackfire.ini $PHP_INI_DIR/conf.d/zz-blackfire.ini.disabled) \
|| echo "Skipped blackfire as the installation failed" \
&& 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
# mod_rewrite
RUN a2enmod rewrite headers
# increase limit request body
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-available/limit-request-body.conf && a2enconf limit-request-body
VOLUME /var/www/html
VOLUME /var/www/html/apps-writable
VOLUME /var/www/html/config
VOLUME /var/www/html/data
ENV SQL sqlite
ENV NEXTCLOUD_AUTOINSTALL YES
ENV WITH_REDIS NO
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
@@ -94,6 +88,5 @@ WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD data/installing.html /root/installing.html
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php configs/apcu.config.php /root/
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/
+53 -60
View File
@@ -1,49 +1,59 @@
FROM php:7.3-apache
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
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 chmod +x /usr/local/bin/install-php-extensions
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 install-php-extensions \
apcu \
bcmath \
blackfire \
exif \
gd \
gmp \
imagick \
intl \
ldap \
oci8 \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
redis \
smbclient \
sysvsem \
xdebug \
zip \
@composer
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
# dev tools separate install so we quickly change without rebuilding all php extenions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync \
&& rm -rf /var/lib/apt/lists/*
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN wget -O /usr/local/bin/phpunit8 https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x /usr/local/bin/phpunit8 \
&& wget -O /usr/local/bin/phpunit9 https://phar.phpunit.de/phpunit-9.phar \
&& chmod +x /usr/local/bin/phpunit9
# Install NVM (Fermium = v14, Gallium = v16)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install lts/gallium \
&& nvm install lts/fermium \
&& npm install -g npm@7
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
@@ -64,29 +74,13 @@ ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
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 \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini \
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini && \
mv $PHP_INI_DIR/conf.d/zz-blackfire.ini $PHP_INI_DIR/conf.d/zz-blackfire.ini.disabled) \
|| echo "Skipped blackfire as the installation failed" \
&& 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
# mod_rewrite
RUN a2enmod rewrite headers
# increase limit request body
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-available/limit-request-body.conf && a2enconf limit-request-body
VOLUME /var/www/html
VOLUME /var/www/html/apps-writable
VOLUME /var/www/html/config
VOLUME /var/www/html/data
ENV SQL sqlite
ENV NEXTCLOUD_AUTOINSTALL YES
ENV WITH_REDIS NO
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
@@ -94,6 +88,5 @@ WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD data/installing.html /root/installing.html
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php configs/apcu.config.php /root/
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/
+53 -60
View File
@@ -1,49 +1,59 @@
FROM php:7.4-apache
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
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 chmod +x /usr/local/bin/install-php-extensions
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 install-php-extensions \
apcu \
bcmath \
blackfire \
exif \
gd \
gmp \
imagick \
intl \
ldap \
oci8 \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
redis \
smbclient \
sysvsem \
xdebug \
zip \
@composer
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
# dev tools separate install so we quickly change without rebuilding all php extenions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync \
&& rm -rf /var/lib/apt/lists/*
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN wget -O /usr/local/bin/phpunit8 https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x /usr/local/bin/phpunit8 \
&& wget -O /usr/local/bin/phpunit9 https://phar.phpunit.de/phpunit-9.phar \
&& chmod +x /usr/local/bin/phpunit9
# Install NVM (Fermium = v14, Gallium = v16)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install lts/gallium \
&& nvm install lts/fermium \
&& npm install -g npm@7
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
@@ -64,29 +74,13 @@ ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
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 \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini \
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini && \
mv $PHP_INI_DIR/conf.d/zz-blackfire.ini $PHP_INI_DIR/conf.d/zz-blackfire.ini.disabled) \
|| echo "Skipped blackfire as the installation failed" \
&& 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
# mod_rewrite
RUN a2enmod rewrite headers
# increase limit request body
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-available/limit-request-body.conf && a2enconf limit-request-body
VOLUME /var/www/html
VOLUME /var/www/html/apps-writable
VOLUME /var/www/html/config
VOLUME /var/www/html/data
ENV SQL sqlite
ENV NEXTCLOUD_AUTOINSTALL YES
ENV WITH_REDIS NO
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
@@ -94,6 +88,5 @@ WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD data/installing.html /root/installing.html
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php configs/apcu.config.php /root/
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/
+53 -60
View File
@@ -1,49 +1,59 @@
FROM php:8.0-apache
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
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 chmod +x /usr/local/bin/install-php-extensions
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 install-php-extensions \
apcu \
bcmath \
blackfire \
exif \
gd \
gmp \
imagick \
intl \
ldap \
oci8 \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
redis \
smbclient \
sysvsem \
xdebug \
zip \
@composer
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
# dev tools separate install so we quickly change without rebuilding all php extenions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync \
&& rm -rf /var/lib/apt/lists/*
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN wget -O /usr/local/bin/phpunit8 https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x /usr/local/bin/phpunit8 \
&& wget -O /usr/local/bin/phpunit9 https://phar.phpunit.de/phpunit-9.phar \
&& chmod +x /usr/local/bin/phpunit9
# Install NVM (Fermium = v14, Gallium = v16)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install lts/gallium \
&& nvm install lts/fermium \
&& npm install -g npm@7
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
@@ -64,29 +74,13 @@ ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
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 \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini \
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini && \
mv $PHP_INI_DIR/conf.d/zz-blackfire.ini $PHP_INI_DIR/conf.d/zz-blackfire.ini.disabled) \
|| echo "Skipped blackfire as the installation failed" \
&& 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
# mod_rewrite
RUN a2enmod rewrite headers
# increase limit request body
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-available/limit-request-body.conf && a2enconf limit-request-body
VOLUME /var/www/html
VOLUME /var/www/html/apps-writable
VOLUME /var/www/html/config
VOLUME /var/www/html/data
ENV SQL sqlite
ENV NEXTCLOUD_AUTOINSTALL YES
ENV WITH_REDIS NO
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
@@ -94,6 +88,5 @@ WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD data/installing.html /root/installing.html
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php configs/apcu.config.php /root/
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/
+53 -60
View File
@@ -1,49 +1,59 @@
FROM php:8.1-apache
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
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 chmod +x /usr/local/bin/install-php-extensions
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 install-php-extensions \
apcu \
bcmath \
blackfire \
exif \
gd \
gmp \
imagick \
intl \
ldap \
oci8 \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
redis \
smbclient \
sysvsem \
xdebug-^3.2 \
zip \
@composer
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
# dev tools separate install so we quickly change without rebuilding all php extenions
RUN apt update && apt-get install -y --no-install-recommends \
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync \
&& rm -rf /var/lib/apt/lists/*
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN wget -O /usr/local/bin/phpunit8 https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x /usr/local/bin/phpunit8 \
&& wget -O /usr/local/bin/phpunit9 https://phar.phpunit.de/phpunit-9.phar \
&& chmod +x /usr/local/bin/phpunit9
# Install NVM (Fermium = v14, Gallium = v16)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install lts/gallium \
&& nvm install lts/fermium \
&& npm install -g npm@7
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
RUN { \
@@ -64,29 +74,13 @@ ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
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 \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini \
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini && \
mv $PHP_INI_DIR/conf.d/zz-blackfire.ini $PHP_INI_DIR/conf.d/zz-blackfire.ini.disabled) \
|| echo "Skipped blackfire as the installation failed" \
&& 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
# mod_rewrite
RUN a2enmod rewrite headers
# increase limit request body
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-available/limit-request-body.conf && a2enconf limit-request-body
VOLUME /var/www/html
VOLUME /var/www/html/apps-writable
VOLUME /var/www/html/config
VOLUME /var/www/html/data
ENV SQL sqlite
ENV NEXTCLOUD_AUTOINSTALL YES
ENV WITH_REDIS NO
RUN a2enmod rewrite
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
@@ -94,6 +88,5 @@ WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD data/installing.html /root/installing.html
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php configs/apcu.config.php /root/
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/
+4
View File
@@ -0,0 +1,4 @@
.PHONY: Dockerfile.*
Dockerfile.*:
NAME=$$(echo $@ | sed 's/^.*\.//'); echo "=> Building image $$NAME"; \
(docker build -t ghcr.io/juliushaertl/nextcloud-dev-$$NAME:latest -f Dockerfile.$$NAME .)
+42 -133
View File
@@ -2,22 +2,12 @@
# shellcheck disable=SC2181
DOMAIN_SUFFIX=".$(echo "$VIRTUAL_HOST" | cut -d '.' -f2-)"
IS_STANDALONE=$([ -z "$VIRTUAL_HOST" ] && echo "true" )
indent() { sed 's/^/ /'; }
# Prepare waiting page during auto installation
cp /root/installing.html /var/www/html/installing.html
output() {
echo "$@"
echo "$@" >> /var/www/html/installing.html
}
OCC() {
output "occ" "$@"
# shellcheck disable=SC2068
sudo -E -u www-data php "$WEBROOT/occ" $@ | indent
sudo -E -u www-data "$WEBROOT/occ" $@ | indent
}
update_permission() {
@@ -27,40 +17,25 @@ update_permission() {
chown www-data:www-data "$WEBROOT"/config/config.php 2>/dev/null
}
configure_xdebug_mode() {
if [ -n "$PHP_XDEBUG_MODE" ]
then
sed -i "s/^xdebug.mode\s*=.*/xdebug.mode = ${PHP_XDEBUG_MODE//\//_}/" /usr/local/etc/php/conf.d/xdebug.ini
unset PHP_XDEBUG_MODE
else
echo "⚠ No value for PHP_XDEBUG_MODE was found. Not updating the setting."
fi
}
wait_for_other_containers() {
output "⌛ Waiting for other containers"
echo "⌛ Waiting for other containers"
if [ "$SQL" = "mysql" ]
then
output " - MySQL"
echo " - MySQL"
while ! timeout 1 bash -c "(echo > /dev/tcp/database-mysql/3306) 2>/dev/null"; do sleep 2; done
[ $? -ne 0 ] && echo "⚠ Unable to connect to the MySQL server"
sleep 2
fi
if [ "$SQL" = "pgsql" ]
then
while ! timeout 1 bash -c "(echo > /dev/tcp/database-postgres/5432) 2>/dev/null"; do sleep 2; done
[ $? -ne 0 ] && echo "⚠ Unable to connect to the PostgreSQL server"
sleep 2
fi
[ $? -eq 0 ] && output "✅ Database server ready"
sleep 2
[ $? -eq 0 ] && echo "✅ Database server ready"
}
configure_gs() {
OCC config:system:set lookup_server --value=""
if [[ "$IS_STANDALONE" = "true" ]]; then
return 0
fi
OCC config:system:set lookup_server --value ""
get_protocol
LOOKUP_SERVER="${PROTOCOL}://lookup${DOMAIN_SUFFIX}/index.php"
@@ -90,13 +65,9 @@ configure_gs() {
}
configure_ldap() {
if [[ "$IS_STANDALONE" = "true" ]]; then
return 0
fi
timeout 5 bash -c 'until echo > /dev/tcp/ldap/389; do sleep 0.5; done' 2>/dev/null
if [ $? -eq 0 ]; then
output "LDAP server available"
echo "LDAP server available"
export LDAP_USER_FILTER="(|(objectclass=inetOrgPerson))"
OCC app:enable user_ldap
@@ -125,36 +96,38 @@ configure_ldap() {
}
configure_oidc() {
if [[ "$IS_STANDALONE" = "true" ]]; then
return 0
fi
OCC app:enable user_oidc
get_protocol
OCC user_oidc:provider Keycloak -c nextcloud -s 09e3c268-d8bc-42f1-b7c6-74d307ef5fde -d "$PROTOCOL://keycloak${DOMAIN_SUFFIX}/realms/Example/.well-known/openid-configuration"
OCC user_oidc:provider Keycloak -c nextcloud -s 09e3c268-d8bc-42f1-b7c6-74d307ef5fde -d "$PROTOCOL://keycloak.local.dev.bitgrid.net/auth/realms/Example/.well-known/openid-configuration"
}
PROTOCOL="${PROTOCOL:-http}"
PROTOCOL=""
get_protocol() {
if [[ "$IS_STANDALONE" = "true" ]]; then
PROTOCOL=http
return 0
fi
if [[ "$PROTOCOL" == "" ]]; then
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
else
echo "🗝 No SSL proxy, removing overwriteprotocol"
PROTOCOL=http
fi
fi
}
configure_ssl_proxy() {
if [[ "$IS_STANDALONE" = "true" ]]; then
return 0
fi
get_protocol
if [[ "$PROTOCOL" == "https" ]]; then
echo "🔑 SSL proxy available, configuring overwrite.cli.url accordingly"
OCC config:system:set overwrite.cli.url --value "https://$VIRTUAL_HOST" &
echo "🔑 SSL proxy available, configuring proxy settings"
OCC config:system:set overwriteprotocol --value https
OCC config:system:set overwrite.cli.url --value "https://$VIRTUAL_HOST"
else
echo "🗝 No SSL proxy, configuring overwrite.cli.url accordingly"
OCC config:system:set overwrite.cli.url --value "http://$VIRTUAL_HOST" &
echo "🗝 No SSL proxy, removing overwriteprotocol"
OCC config:system:delete overwriteprotocol
OCC config:system:set overwrite.cli.url --value "http://$VIRTUAL_HOST"
fi
update-ca-certificates
}
@@ -191,54 +164,35 @@ install() {
cp /root/config.php "$WEBROOT"/config/config.php
chown -R www-data:www-data "$WEBROOT"/config/config.php
mkdir -p "$WEBROOT/apps-extra"
mkdir -p "$WEBROOT/apps-shared"
update_permission
USER="admin"
PASSWORD="admin"
output "🔧 Starting auto installation"
echo "🔧 Starting auto installation"
if [ "$SQL" = "oci" ]; then
OCC maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database="$SQL" --database-name=xe --database-host="$SQLHOST" --database-user=system --database-pass=oracle
OCC maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database="$SQL" --database-name=xe --database-host=$SQLHOST --database-user=system --database-pass=oracle
elif [ "$SQL" = "pgsql" ]; then
OCC maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database="$SQL" --database-name="$DBNAME" --database-host="$SQLHOST" --database-user=postgres --database-pass=postgres
OCC maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database="$SQL" --database-name="$DBNAME" --database-host=$SQLHOST --database-user=postgres --database-pass=postgres
elif [ "$SQL" = "mysql" ]; then
OCC maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database="$SQL" --database-name="$DBNAME" --database-host="$SQLHOST" --database-user=root --database-pass=nextcloud
OCC maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database="$SQL" --database-name="$DBNAME" --database-host=$SQLHOST --database-user=root --database-pass=nextcloud
else
OCC maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database="$SQL"
fi;
output "🔧 Server installed"
output "🔧 Provisioning apps"
OCC app:disable password_policy
for app in $NEXTCLOUD_AUTOINSTALL_APPS; do
APP_ENABLED=$(OCC app:enable "$app")
output "$APP_ENABLED"
WAIT_TIME=0
until [[ $WAIT_TIME -eq ${NEXTCLOUD_AUTOINSTALL_APPS_WAIT_TIME:-0} ]] || [[ $APP_ENABLED =~ ${app}.*enabled$ ]]
do
# if app is not installed pause for 1 seconds and enable again
output "🔄 retrying"
sleep 1
APP_ENABLED=$(OCC app:enable "$app")
output "$APP_ENABLED"
((WAIT_TIME++))
done
OCC app:enable "$app"
done
configure_gs
configure_ldap
configure_oidc
output "🔧 Finetuning the configuration"
if [ "$WITH_REDIS" != "NO" ]; then
cp /root/redis.config.php "$WEBROOT"/config/
else
cp /root/apcu.config.php "$WEBROOT"/config/
fi
OCC user:setting admin settings email admin@example.net
# Setup domains
# localhost is at index 0 due to the installation
@@ -253,14 +207,8 @@ install() {
NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX + 1))
done
fi
TRUSTED_PROXY=$(ip a show type veth | awk '/scope global/ {print $2}')
OCC config:system:set trusted_proxies 0 --value="$TRUSTED_PROXY"
configure_ssl_proxy
output "🔧 Preparing cron job"
# Setup initial configuration
OCC background:cron
@@ -270,10 +218,9 @@ install() {
# run custom shell script from nc root
# [ -e /var/www/html/nc-dev-autosetup.sh ] && bash /var/www/html/nc-dev-autosetup.sh
output "🔧 Setting up users and LDAP in the background"
OCC user:setting admin settings email admin@example.net &
echo "🔧 Setting up users and LDAP in the background"
INSTANCENAME=$(echo "$VIRTUAL_HOST" | cut -d '.' -f1)
configure_add_user "${INSTANCENAME:-nextcloud}" &
configure_add_user "$INSTANCENAME" &
configure_add_user user1 &
configure_add_user user2 &
configure_add_user user3 &
@@ -284,8 +231,9 @@ install() {
configure_add_user john &
configure_add_user alice &
configure_add_user bob &
configure_ldap &
output "🚀 Finished setup using $SQL database…"
echo "🚀 Finished setup using $SQL database…"
}
add_hosts() {
@@ -295,11 +243,10 @@ add_hosts() {
setup() {
update_permission
configure_xdebug_mode
STATUS=$(OCC status)
if [[ "$STATUS" = *"installed: true"* ]] || [[ ! -f $WEBROOT/config/config.php ]]
then
output "🚀 Nextcloud already installed ... skipping setup"
echo "🚀 Nextcloud already installed ... skipping setup"
# configuration that should be applied on each start
configure_ssl_proxy
@@ -312,52 +259,14 @@ setup() {
fi
}
check_source() {
FILE=/var/www/html/status.php
if [ -f "$FILE" ]; then
output "Server source is mounted, continuing"
else
output "Server source is not present, fetching ${SERVER_BRANCH:-master}"
git clone --depth 1 --branch "${SERVER_BRANCH:-master}" https://github.com/nextcloud/server.git /tmp/server
(cd /tmp/server && git submodule update --init)
output "Cloning additional apps"
git clone --depth 1 --branch "${SERVER_BRANCH:-master}" https://github.com/nextcloud/viewer.git /tmp/server/apps/viewer
# shallow clone of submodules https://stackoverflow.com/questions/2144406/how-to-make-shallow-git-submodules
git config -f .gitmodules submodule.3rdparty.shallow true
(cd /tmp/server && git submodule update --init)
rsync -a --chmod=755 --chown=www-data:www-data /tmp/server/ /var/www/html
chown www-data: /var/www/html
chown www-data: /var/www/html/.htaccess
fi
output "Nextcloud server source is ready"
}
wait_for_other_containers
setup
tee /etc/apache2/conf-enabled/install.conf << EOF
<Directory "/var/www/html">
AllowOverride None
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !/installing.html$
RewriteRule .* /installing.html [L]
</Directory>
EOF
pkill -USR1 apache2
(
check_source
wait_for_other_containers
setup
rm /etc/apache2/conf-enabled/install.conf
rm -f /var/www/html/installing.html
pkill -USR1 apache2
) &
touch /var/log/cron/nextcloud.log "$WEBROOT"/data/nextcloud.log /var/log/xdebug.log
chown www-data /var/log/xdebug.log
touch /var/log/cron/nextcloud.log "$WEBROOT"/data/nextcloud.log
echo "📰 Watching log file"
tail --follow "$WEBROOT"/data/nextcloud.log /var/log/cron/nextcloud.log /var/log/xdebug.log &
tail --follow "$WEBROOT"/data/nextcloud.log /var/log/cron/nextcloud.log &
echo "⌚ Starting cron"
/usr/sbin/cron -f &
-1
View File
@@ -1 +0,0 @@
FROM collabora/code
-21
View File
@@ -1,21 +0,0 @@
FROM --platform=linux/amd64 ubuntu:22.04
RUN apt update && \
apt install -y git build-essential zip ccache junit4 libkrb5-dev nasm graphviz python3 python3-dev qtbase5-dev libkf5coreaddons-dev libkf5i18n-dev libkf5config-dev libkf5windowsystem-dev libkf5kio-dev autoconf libcups2-dev libfontconfig1-dev gperf default-jdk doxygen libxslt1-dev xsltproc libxml2-utils libxrandr-dev libx11-dev bison flex libgtk-3-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev ant ant-optional libnss3-dev libavahi-client-dev libxt-dev \
sudo git vim wget curl \
dialog \
libpoco-dev python3-polib libcap-dev npm \
libpam-dev wget git build-essential libtool \
libcap2-bin python3-lxml libpng-dev libcppunit-dev \
pkg-config fontconfig \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g sass
RUN adduser --quiet --disabled-password --gecos '' --system --group --home /collabora cool
RUN adduser cool sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
EXPOSE 9980
USER cool
-3
View File
@@ -1,3 +0,0 @@
<?php $CONFIG=[
'memcache.local' => '\\OC\\Memcache\\APCu',
];
-8
View File
@@ -16,12 +16,6 @@
'writable' => false,
),
2 =>
array (
'path' => '/var/www/html/apps-shared',
'url' => '/apps-shared',
'writable' => false,
),
3 =>
array (
'path' => '/var/www/html/apps-writable',
'url' => '/apps-writable',
@@ -42,7 +36,5 @@
'skeletondirectory' => '/skeleton',
'setup_create_db_user' => false,
//PLACEHOLDER
];
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+6 -10
View File
@@ -1,18 +1,14 @@
; off develop debug gcstats profile trace
xdebug.mode = off
# off develop debug gcstats profile trace
xdebug.mode = debug
xdebug.idekey=PHPSTORM
xdebug.trace_output_name=trace.%R.%u
xdebug.profiler_output_name=profile.%R.%u
xdebug.output_dir=/shared
xdebug.log = /var/log/xdebug.log
xdebug.log_level = 1
; Try to discover the client host, otherwise fall back to the docker host
# Try to discover the client host, otherwise fall back to the docker host
xdebug.discover_client_host=true
xdebug.client_host=host.docker.internal
; When you cannot specify a trigger, use "xdebug.start_with_request = yes" to autostart debugging for all requests
; https://xdebug.org/docs/all_settings#start_with_request
xdebug.start_with_request = trigger
xdebug.trace_format=0
# set this to autostart debugging e.g. if you cannot specify the trigger in the request
# https://xdebug.org/docs/all_settings#start_with_request
# xdebug.start_with_request = yes
-75
View File
@@ -1,75 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="1" />
<meta charset="utf-8">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
margin: auto;
max-width: 700px;
}
.lds-ellipsis {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.lds-ellipsis div {
position: absolute;
top: 33px;
width: 13px;
height: 13px;
border-radius: 50%;
background: #000;
animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.lds-ellipsis div:nth-child(1) {
left: 8px;
animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
left: 8px;
animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
left: 32px;
animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
left: 56px;
animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@keyframes lds-ellipsis3 {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
@keyframes lds-ellipsis2 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(24px, 0);
}
}
</style>
</head>
<body>
<h1>Installing container</h1>
<p>Please wait until the server is ready. This page will redirect you to the login once done.</p>
<h2>Log:</h2>
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
<pre>
-2
View File
@@ -1,2 +0,0 @@
FROM nginxproxy/nginx-proxy:latest
ADD nginx/my_proxy.conf /etc/nginx/conf.d
-8
View File
@@ -1,8 +0,0 @@
server_tokens off;
client_max_body_size 1024m;
proxy_read_timeout 3600;
proxy_send_timeout 3600;
proxy_connect_timeout 3600;
proxy_set_header X-Forwarded-Proto $scheme;
-99
View File
@@ -1,99 +0,0 @@
FROM php:8.2-apache
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions
RUN install-php-extensions \
apcu \
bcmath \
blackfire \
exif \
gd \
gmp \
imagick \
intl \
ldap \
oci8 \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
redis \
smbclient \
sysvsem \
xdebug-^3.2 \
zip \
@composer
# 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 rsync \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN wget -O /usr/local/bin/phpunit8 https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x /usr/local/bin/phpunit8 \
&& wget -O /usr/local/bin/phpunit9 https://phar.phpunit.de/phpunit-9.phar \
&& chmod +x /usr/local/bin/phpunit9
# Install NVM (Fermium = v14, Gallium = v16)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install lts/gallium \
&& nvm install lts/fermium \
&& npm install -g npm@7
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 \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini \
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini && \
mv $PHP_INI_DIR/conf.d/zz-blackfire.ini $PHP_INI_DIR/conf.d/zz-blackfire.ini.disabled) \
|| echo "Skipped blackfire as the installation failed" \
&& rm -rf /var/lib/apt/lists/*
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# mod_rewrite
RUN a2enmod rewrite headers
# increase limit request body
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-available/limit-request-body.conf && a2enconf limit-request-body
VOLUME /var/www/html
VOLUME /var/www/html/apps-writable
VOLUME /var/www/html/config
VOLUME /var/www/html/data
ENV SQL sqlite
ENV NEXTCLOUD_AUTOINSTALL YES
ENV WITH_REDIS NO
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD data/installing.html /root/installing.html
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php configs/apcu.config.php /root/
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
-100
View File
@@ -1,100 +0,0 @@
FROM php:8.3-apache
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions
RUN install-php-extensions \
apcu \
bcmath \
blackfire \
exif \
gd \
gmp \
# waiting for https://github.com/mlocati/docker-php-extension-installer/pull/811
# imagick \
intl \
ldap \
oci8 \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
redis \
smbclient \
sysvsem \
# xdebug \
zip \
@composer
# 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 rsync \
&& rm -rf /var/lib/apt/lists/*
# Install PHPUnit
RUN wget -O /usr/local/bin/phpunit8 https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x /usr/local/bin/phpunit8 \
&& wget -O /usr/local/bin/phpunit9 https://phar.phpunit.de/phpunit-9.phar \
&& chmod +x /usr/local/bin/phpunit9
# Install NVM (Fermium = v14, Gallium = v16)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install lts/gallium \
&& nvm install lts/fermium \
&& npm install -g npm@7
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 \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini \
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini && \
mv $PHP_INI_DIR/conf.d/zz-blackfire.ini $PHP_INI_DIR/conf.d/zz-blackfire.ini.disabled) \
|| echo "Skipped blackfire as the installation failed" \
&& rm -rf /var/lib/apt/lists/*
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# mod_rewrite
RUN a2enmod rewrite headers
# increase limit request body
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-available/limit-request-body.conf && a2enconf limit-request-body
VOLUME /var/www/html
VOLUME /var/www/html/apps-writable
VOLUME /var/www/html/config
VOLUME /var/www/html/data
ENV SQL sqlite
ENV NEXTCLOUD_AUTOINSTALL YES
ENV WITH_REDIS NO
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
CMD ["apache2-foreground"]
ADD data/installing.html /root/installing.html
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php configs/apcu.config.php /root/
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
-7
View File
@@ -1,7 +0,0 @@
FROM alpine
RUN wget https://github.com/nextcloud/notify_push/releases/download/v0.6.3/notify_push-`uname -m`-unknown-linux-musl -O /notify_push && chmod +x /notify_push && /notify_push --version
EXPOSE 7867
CMD ["/notify_push"]
-49
View File
@@ -1,49 +0,0 @@
# Taken from https://github.com/strukturag/nextcloud-spreed-signaling/blob/54c1af7f4f1b598a9f2c1ae37b76b37e9dda3ee8/docker/janus/Dockerfile
# Modified from https://gitlab.com/powerpaul17/nc_talk_backend/-/blob/dcbb918d8716dad1eb72a889d1e6aa1e3a543641/docker/janus/Dockerfile
FROM alpine:3.18
RUN apk add --no-cache curl autoconf automake libtool pkgconf build-base \
glib-dev libconfig-dev libnice-dev jansson-dev openssl-dev zlib libsrtp-dev \
gengetopt libwebsockets-dev git curl-dev libogg-dev
# usrsctp
# 08 Oct 2021
ARG USRSCTP_VERSION=7c31bd35c79ba67084ce029511193a19ceb97447
RUN cd /tmp && \
git clone https://github.com/sctplab/usrsctp && \
cd usrsctp && \
git checkout $USRSCTP_VERSION && \
./bootstrap && \
./configure --prefix=/usr && \
make && make install
# libsrtp
ARG LIBSRTP_VERSION=2.4.2
RUN cd /tmp && \
wget https://github.com/cisco/libsrtp/archive/v$LIBSRTP_VERSION.tar.gz && \
tar xfv v$LIBSRTP_VERSION.tar.gz && \
cd libsrtp-$LIBSRTP_VERSION && \
./configure --prefix=/usr --enable-openssl && \
make shared_library && \
make install && \
rm -fr /libsrtp-$LIBSRTP_VERSION && \
rm -f /v$LIBSRTP_VERSION.tar.gz
# JANUS
ARG JANUS_VERSION=0.11.8
RUN mkdir -p /usr/src/janus && \
cd /usr/src/janus && \
curl -L https://github.com/meetecho/janus-gateway/archive/v$JANUS_VERSION.tar.gz | tar -xz && \
cd /usr/src/janus/janus-gateway-$JANUS_VERSION && \
./autogen.sh && \
./configure --disable-rabbitmq --disable-mqtt --disable-boringssl && \
make && \
make install && \
make configs
WORKDIR /usr/src/janus/janus-gateway-$JANUS_VERSION
CMD [ "janus", "--full-trickle" ]
+8
View File
@@ -0,0 +1,8 @@
# Antivirus
```bash
docker compose up -d proxy nextcloud av
```
The clanav antivirus will then be exposed as a deamon with host `clam` and
port 3310.
+10
View File
@@ -0,0 +1,10 @@
# 🚀 Blackfire
Blackfire needs to use a hostname/ip that is resolvable from within the blackfire container. Their free version is [limited to local profiling](https://support.blackfire.io/troubleshooting/hack-edition-users-cannot-profile-non-local-http-applications) so we need to browse Nextcloud though its local docker IP or add the hostname to `/etc/hosts`.
## Using with curl
```
alias blackfire='docker compose exec -e BLACKFIRE_CLIENT_ID=$BLACKFIRE_CLIENT_ID -e BLACKFIRE_CLIENT_TOKEN=$BLACKFIRE_CLIENT_TOKEN blackfire blackfire'
blackfire curl http://192.168.21.8/
```
+9
View File
@@ -0,0 +1,9 @@
# Collabora
- Make sure to have the collabora hostname setup in your /etc/hosts file: `127.0.0.1 collabora.local`
- 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
+19
View File
@@ -0,0 +1,19 @@
# Full Text Search
To use Full Text Search, follow these commands :
```bash
docker compose down -v
docker compose up nextcloud proxy elasticsearch elasticsearch-ui
```
You can add another services from `docker-compose.yaml` if you want.
- Address for configuring in Nextcloud: `http://elastic:elastic@elasticsearch:9200`
- Adress to access elastic search from outside: `http://elastic:elastic@elasticsearch.local`
- Address for accessing the ui: http://elasticsearch-ui.local/
```bash
sudo sysctl -w vm.max_map_count=262144
```
+7
View File
@@ -0,0 +1,7 @@
## Global scale
```bash
docker compose up -d proxy portal gs1 gs2 lookup database-mysql
```
Users are named the same as the instance name, e.g. gs1, gs2
+8
View File
@@ -0,0 +1,8 @@
# Imaginary
Enable the imaginary server for generating previews
```bash
docker composer up proxy nextcloud previews_hpb
./scripts/enable-preview-imaginary.sh
```
+7
View File
@@ -0,0 +1,7 @@
# Keycloak
- Keycloak is using ldap as a user backend (make sure the ldap container is also running)
- `occ user_oidc:provider Keycloak -c nextcloud -s 09e3c268-d8bc-42f1-b7c6-74d307ef5fde -d https://keycloak.local.dev.bitgrid.net/auth/realms/Example/.well-known/openid-configuration`
- https://keycloak.local.dev.bitgrid.net/auth/realms/Example/.well-known/openid-configuration
- nextcloud
- 09e3c268-d8bc-42f1-b7c6-74d307ef5fde
+29
View File
@@ -0,0 +1,29 @@
# 👥 LDAP
The LDAP sample data is based on https://github.com/rroemhild/docker-test-openldap and extended with randomly generated users/groups. For details see [data/ldap-generator/](https://github.com/juliushaertl/nextcloud-docker-dev/tree/master/data/ldap-generator). LDAP will be configured automatically if the ldap container is available during installation.
|uid (login) | password |
|---|---|
| leela | leela |
| fry | fry |
| zoidberg | zoidberg |
| hermes | hermes |
| professor | professor |
| ... | ... |
To add LDAP in your dev environment use these commands :
```bash
docker compose down -v
docker compose up nextcloud proxy ldap
```
You can add another services from `docker-compose.yaml` if you want.
Useful commands to know all LDAP's objects :
```
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*))"
```
+5
View File
@@ -0,0 +1,5 @@
# ✉ Mail
Sending/receiving mails can be tested with [mailhog](https://github.com/mailhog/MailHog) which is available on ports 1025 (SMTP).
To use the webui, add `127.0.0.1 mail.local` to your `/etc/hosts` and open [mail.local](http://mail.local).
+25
View File
@@ -0,0 +1,25 @@
# Mysql
This is information about the mysql service :
- user root : `root`
- password root : `nextcloud`
- user : `nextcloud`
- password : `nextcloud`
- database name : `nextcloud`
## How to connect on the mysql service ?
You can run this command to be in the mysql prompt as no root :
```bash
docker compose exec database-mysql mysql -unextcloud -pnextcloud
```
If you want to be as root, use this command :
```bash
docker compose exec database-mysql mysql -uroot -pnextcloud
```
+7
View File
@@ -0,0 +1,7 @@
# Object storage
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
```
+9
View File
@@ -0,0 +1,9 @@
# 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
+65
View File
@@ -0,0 +1,65 @@
# SAML
```bash
docker compose up -d proxy nextcloud saml
```
- uid mapping: `urn:oid:0.9.2342.19200300.100.1.1`
- idp entity id: `https://sso.local.dev.bitgrid.net/simplesaml/saml2/idp/metadata.php`
- single sign on service url: `https://sso.local.dev.bitgrid.net/simplesaml/saml2/idp/SSOService.php`
- single log out service url: `https://sso.local.dev.bitgrid.net/simplesaml/saml2/idp/SingleLogoutService.php`
- use certificate from docker/configs/var-simplesamlphp/cert/example.org.crt
```
-----BEGIN CERTIFICATE-----
MIICrDCCAhWgAwIBAgIUNtfnC2jE/rLdxHCs2th3WaYLryAwDQYJKoZIhvcNAQEL
BQAwaDELMAkGA1UEBhMCREUxCzAJBgNVBAgMAkJZMRIwEAYDVQQHDAlXdWVyemJ1
cmcxFDASBgNVBAoMC0V4YW1wbGUgb3JnMSIwIAYDVQQDDBlzc28ubG9jYWwuZGV2
LmJpdGdyaWQubmV0MB4XDTE5MDcwMzE0MjkzOFoXDTI5MDcwMjE0MjkzOFowaDEL
MAkGA1UEBhMCREUxCzAJBgNVBAgMAkJZMRIwEAYDVQQHDAlXdWVyemJ1cmcxFDAS
BgNVBAoMC0V4YW1wbGUgb3JnMSIwIAYDVQQDDBlzc28ubG9jYWwuZGV2LmJpdGdy
aWQubmV0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHPZwU+dAc76yB6bOq
0AkP1y9g7aAi1vRtJ9GD4AEAsA3zjW1P60BYs92mvZwNWK6NxlJYw51xPak9QMk5
qRHaTdBkmq0a2mWYqh1AZNNgCII6/VnLcbEIgyoXB0CCfY+2vaavAmFsRwOMdeR9
HmtQQPlbTA4m5Y8jWGVs1qPtDQIDAQABo1MwUTAdBgNVHQ4EFgQUeZSoGKeN5uu5
K+n98o3wcitFYJ0wHwYDVR0jBBgwFoAUeZSoGKeN5uu5K+n98o3wcitFYJ0wDwYD
VR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOBgQA25X/Ke+5dw7up8gcF2BNQ
ggBcJs+SVKBmPwRcPQ8plgX4D/K8JJNT13HNlxTGDmb9elXEkzSjdJ+6Oa8n3IMe
vUUejXDXUBvlmmm+ImJVwwCn27cSfIYb/RoZPeKtned4SCzpbEO9H/75z3XSqAZS
Z1tiHzYOVtEs4UNGOtz1Jg==
-----END CERTIFICATE-----
```
- cn `urn:oid:2.5.4.3`
- email `urn:oid:0.9.2342.19200300.100.1.3`
## Environment based SSO
A simple approach to test environment based SSO with the user_saml app is to use apache basic auth with the following configuration:
```xml
<Location /login>
AuthType Basic
AuthName "SAML"
AuthUserFile /var/www/html/.htpasswd
Require valid-user
</Location>
<Location /index.php/login>
AuthType Basic
AuthName "SAML"
AuthUserFile /var/www/html/.htpasswd
Require valid-user
</Location>
<Location /index.php/apps/user_saml/saml/login>
AuthType Basic
AuthName "SAML"
AuthUserFile /var/www/html/.htpasswd
Require valid-user
</Location>
<Location /apps/user_saml/saml/login>
AuthType Basic
AuthName "SAML"
AuthUserFile /var/www/html/.htpasswd
Require valid-user
</Location>
```
+52
View File
@@ -0,0 +1,52 @@
# SSL
## What is SSL ?
<!-- ## How to use this container with others ?-->
<!-- This section describes if there are particularities or others with this container. -->
## 🔒 Reverse Proxy
Used for SSL termination. To setup SSL support provide a proper DOMAIN_SUFFIX environment variable and put the certificates to ./data/ssl/ named by the domain name.
You might need to add the domains to your `/etc/hosts` file:
```
127.0.0.1 nextcloud.local
127.0.0.1 collabora.local
```
This is assuming you have set `DOMAIN_SUFFIX=.local`
You can generate it through:
```bash
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:
```bash
cd data/ssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nextcloud.local.key -out nextcloud.local.crt
```
### dnsmasq to resolve wildcard domains
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=.local`:
```
address=/.local/127.0.0.1
```
### Use valid certificates trusted by your system
* Install mkcert https://github.com/FiloSottile/mkcert
* Go to `data/ssl`
* `mkcert nextcloud.local`
* `mv nextcloud.local-key.pem nextcloud.local.key`
* `mv nextcloud.local.pem nextcloud.local.crt`
* `docker compose restart proxy`
+57
View File
@@ -0,0 +1,57 @@
# Manual setup
## Nextcloud Code
The Nextcloud code base needs to be available including the `3rdparty` submodule. To clone it from github run:
```bash
git clone https://github.com/nextcloud/server.git
cd server
git submodule update --init
pwd
```
The last command prints the path to the Nextcloud server directory.
Use it for setting the `REPO_PATH_SERVER` in the next step.
## Configure my environment
### Copy environment variables
For this section you don't need to run the `./bootstrap.sh` script.
Here, we learn how to customise our development environment !
First, a `.env` file should be created in the repository root, to keep configuration default on the dev setup:
```bash
cp example.env .env
```
Replace `REPO_PATH_SERVER` with your path using the `pwd` command from the project.
```bash
foo@bar:~/Documents/codes/nextcloud-docker-dev$ pwd
/home/foo/Documents/codes/nextcloud-docker-dev
```
And the new value is :
```bash
REPO_PATH_SERVER=/home/foo/Documents/codes/nextcloud-docker-dev/workspace/server
```
### Setting the PHP version to be used
The Nextcloud instance is setup to run with PHP 8.1 by default.
But, the program adapts the PHP default release to suit the Nextcloud stable release using. For example, the stable23 use PHP 7.3 and the stable24 use PHP 7.4.
If you wish to use a different version of PHP, set the `PHP_VERSION` `.env` variable.
The variable supports the following values:
1. PHP 7.1: `71`
1. PHP 7.2: `72`
1. PHP 7.3: `73`
1. PHP 7.4: `74`
1. PHP 8.0: `80`
+28
View File
@@ -0,0 +1,28 @@
# Running stable versions
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:
```bash
cd workspace/server
git fetch --unshallow
```
This may take some time depending on your internet connection speed.
```bash
cd workspace/server
git worktree add ../stable23 stable23
cd ../stable23
git submodule update --init
```
After adding the worktree you can start the stable container using `docker compose up -d stable23`. You can then add stable23.local to your `/etc/hosts` file to access it.
Git worktrees can also be used to have a checkout of an apps stable brach within the server stable directory.
```bash
cd workspace/server/apps-extra/text
git worktree add ../../../stable23/apps-extra/text stable23
```
+8
View File
@@ -0,0 +1,8 @@
## Set up XDebug
Run inside of the Nextcloud container:
```bash
set XDEBUG_CONFIG=idekey=PHPSTORM
sudo -E -u www-data php -dxdebug.remote_host=192.168.21.1 occ
```
+8
View File
@@ -0,0 +1,8 @@
# Troubleshooting
## Running into errors
If your setup isn't working and you can not figure out the reason why, running
`docker compose down -v` will remove the relevant containers and volumes,
allowing you to run `docker compose up` again from a clean slate.
+16
View File
@@ -0,0 +1,16 @@
# Useful commands
## Related to Apache
- Restart apache to reload php configuration without a full container restart: `docker compose kill -s USR1 nextcloud`
## Related to MySql
- Access to mysql console: `mysql -h $(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nextcloud_database-mysql_1) -P 3306 -u nextcloud -pnextcloud`
## Related to LDAP
- Run an LDAP search: `ldapsearch -x -H ldap://$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nextcloud_ldap_1) -D "cn=admin,dc=planetexpress,dc=com" -w admin -b "dc=planetexpress,dc=com" -s subtree <filter> <attrs>`
+3 -17
View File
@@ -1,22 +1,14 @@
COMPOSE_PROJECT_NAME=master
# Default protocol to use for Nextcloud and other containers
# check the readme for details how to setup https
PROTOCOL=http
# Paths
REPO_PATH_SERVER=/home/jus/workspace/server
# Specify a path to apps which will be shared between all containers. Useful for apps that support multiple nextcloud versions
ADDITIONAL_APPS_PATH=/home/jus/workspace/server/apps-shared
REPO_PATH_SERVER=/home/foobar/repos/nextcloud-docker-dev/workspace/server
ADDITIONAL_APPS_PATH=/home/foobar/repos/nextcloud-docker-dev/workspace/server/apps-extra
# Stable releases root directory
STABLE_ROOT_PATH=/home/jus/workspace/
STABLE_ROOT_PATH=/home/foobar/repos/nextcloud-docker-dev/workspace
# Install Nextcloud apps per default
# NEXTCLOUD_AUTOINSTALL_APPS="viewer activity"
# Retry enabling apps for a provided amount of time (can be useful when using the containers in CI)
# NEXTCLOUD_AUTOINSTALL_APPS_WAIT_TIME=0
# Blackfire configuration
# BLACKFIRE_CLIENT_ID=
@@ -40,13 +32,7 @@ DOMAIN_SUFFIX=.local
# PHP_VERSION=72
# PHP_VERSION=73
# PHP_VERSION=74
# PHP_VERSION=80
# PHP_VERSION=81
# May be used to choose database. Both SQL and DB_SERVICE have to be set if used. Defaults to mysql.
# SQL=pgsql
# DB_SERVICE=database-postgres
# The mode of the xdebuger extention. This can be a comma separated list of
# the entries none, develop, debug, trace, and profile.
PHP_XDEBUG_MODE=develop
-14
View File
@@ -1,14 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"labels": ["dependencies"],
"packageRules": [
{
"matchDatasources": ["docker"],
"matchPackageNames": ["php"],
"enabled": false
}
]
}
+2 -3
View File
@@ -18,9 +18,8 @@ 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="${PROTOCOL:-http}://collabora${DOMAIN_SUFFIX}"
occ config:app:set richdocuments public_wopi_url --value="${PROTOCOL:-http}://collabora${DOMAIN_SUFFIX}"
occ config:app:set richdocuments disable_certificate_verification --value="yes"
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
-3
View File
@@ -19,6 +19,3 @@ 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"
docker-compose exec onlyoffice /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/local.json 'services.CoAuthoring.secret.session.string'
+2 -2
View File
@@ -8,6 +8,6 @@ OCC config:system:set enabledPreviewProviders 1 --value 'OC\Preview\TXT'
OCC config:system:set enabledPreviewProviders 2 --value 'OC\Preview\MarkDown'
OCC config:system:set enabledPreviewProviders 3 --value 'OC\Preview\OpenDocument'
OCC config:system:set enabledPreviewProviders 4 --value 'OC\Preview\Krita'
OCC config:system:set enabledPreviewProviders 5 --value 'OC\Preview\Imaginary'
OCC config:system:set enabledPreviewProviders 4 --value 'OC\Preview\Imaginary'
OCC config:system:set preview_imaginary_url --value 'http://previews_hpb:8088'
OCC config:system:set preview_imaginary_url --value 'http://previews_hpb:8088'
-24
View File
@@ -1,24 +0,0 @@
#!/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 talk signaling with http://talk-signaling$DOMAIN_SUFFIX on $CONTAINER"
docker-compose up -d talk-signaling talk-janus
if ! occ talk:signaling:list --output="plain" | grep -q "http://talk-signaling$DOMAIN_SUFFIX"; then
occ talk:signaling:add "http://talk-signaling$DOMAIN_SUFFIX" "1234"
fi
-53
View File
@@ -1,53 +0,0 @@
#!/bin/bash
# Default container name to operate on
instance=${INSTANCE:-nextcloud}
show_help() {
cat << EOF
$0: Run commands in the database backend directly.
Usage:
$0 [PARAMS] -- {MySQL Params}
The PARAMS are interpreted by the wrapper script while the MySQL Params are forwarded literally to the database client.
To separate the two lists, the double dash can be used.
The following parameters are recognized by the wrapper:
--instance/-i INST Use the database for the container INST. (Default: nextcloud)
--help/-h Show this help and exit.
EOF
}
run_mysql() {
docker compose exec database-mysql mysql -u nextcloud -pnextcloud "$instance" "$@"
exit $?
}
while [ $# -gt 0 ]
do
case "$1" in
--instance|-i)
instance="$2"
# Additional shift
shift
;;
--help|-h)
show_help
exit
;;
--)
shift
run_mysql "$@"
;;
*)
echo "Parameter $1 is not recognized. I assume this is for the mysql client."
run_mysql "$@"
;;
esac
# Shift to the next parameter
shift
done
# No parameters were given.
run_mysql
-83
View File
@@ -1,83 +0,0 @@
#!/bin/bash
# Default container name to operate on
container=${CONTAINER:-nextcloud}
# container_set=
show_help() {
cat << EOF
$0: Run OCC commands in containers
Usage:
$0 [CONTAINER] [PARAMS] [--] {OCC_PARAMS}
In CONTAINER you can specify the name of the container to work on. It must be the very first parameter.
With PARAMS you can provide additional information to the script. The possible options are documented below.
The params in OCC_PARAMS are forwarded to the OCC script literally.
With double dash -- you can separate the params from the OCC params. This might be required if the names are recognized by both scripts.
Possible options for PARAMS:
--help/-h Print this help and exit
If the container is not given explicitly, the env variable CONTAINER will be checked. If this is not given, the default value is nextcloud.
Examples:
$0 stable25 -- status
Run the occ command "status" in the stable25 container
$0 stable25 status
The same as above with guessing that status is the occ command in question
$0 app:list
List the apps in the default container (nextcloud)
EOF
}
run_occ() {
docker compose exec --user www-data "$container" ./occ "$@"
exit $?
}
is_valid_container_name() {
if [[ ( $1 =~ ^nextcloud[2,3]?$ ) || ( $1 =~ ^stable[0-9]*$ ) ]]
then
# The param $1 is a valid container name
return 0
else
return 1
fi
}
# Guess if the first entry is a container name
if is_valid_container_name "$1"
then
echo "Using $1 as the container to work on."
container=$1
# container_set=1
shift
fi
while [ $# -gt 0 ]
do
case "$1" in
--help|-h)
show_help
exit
;;
--)
shift
run_occ "$@"
;;
*)
echo "Parameter $1 is not recognized. I assume this is for occ."
run_occ "$@"
;;
esac
# Shift to the next parameter
# shellcheck disable=SC2317
shift
done
run_occ
-60
View File
@@ -1,60 +0,0 @@
#!/bin/bash
if [ -z "$1" ]
then
echo "Usage $0 CONTAINER blackfire on|off"
echo " $0 CONTAINER xdebug.log_level <NUMERIC>"
exit 1
fi
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
restart() {
(cd "$SCRIPT_DIR/.." && docker compose exec "$1" pkill -USR1 apache2)
}
docker_exec() {
# shellcheck disable=SC2068
(cd "$SCRIPT_DIR/.." && docker compose exec $@)
}
docker_compose() {
# shellcheck disable=SC2068
(cd "$SCRIPT_DIR/.." && docker compose $@)
}
if [[ "$2" == "blackfire" ]]
then
if [[ "$3" == "on" ]]
then
echo 'Enabling blackfire'
docker_compose up -d blackfire
docker_exec "$1" "mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini"
else
echo 'Disabling blackfire'
docker_compose stop blackfire
docker_exec "$1" "mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled"
fi
restart "$1"
exit 0
fi
if [[ "$2" =~ "xdebug" ]]
then
if [[ -n "$3" ]]
then
echo "Setting $2 to $3"
value="${3//\//\\\/}"
docker_exec "$1" sed -i 's/^'"$2"'\s*=\s*.*/'"$2"'='"$value"'/g' /usr/local/etc/php/conf.d/xdebug.ini
else
echo "No value provided"
exit 1
fi
restart "$1"
docker_exec "$1" cat /usr/local/etc/php/conf.d/xdebug.ini
exit 0
fi
echo 'Invalid option'
exit 1
-20
View File
@@ -1,20 +0,0 @@
#!/bin/bash
if ! [ -x "$(command -v mkcert)" ]; then
echo 'Error: mkcert is not installed.' >&2
exit 1
fi
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
CERT_DIR="${SCRIPT_DIR}/../data/ssl/"
# shellcheck disable=SC1091
source "${SCRIPT_DIR}/../.env"
awk '$1 == "-"{ if (key == "aliases:") print $NF; next } {key=$1}' docker-compose.yml | \
sed "s/\${DOMAIN_SUFFIX}/${DOMAIN_SUFFIX}/" | \
while read -r line;
do
mkcert -cert-file "${CERT_DIR}${line}.crt" -key-file "${CERT_DIR}${line}.key" "${line}"
done
-35
View File
@@ -1,35 +0,0 @@
#!/bin/bash
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
# shellcheck disable=SC1091
source "${SCRIPT_DIR}/../.env"
function addhost() {
ETC_HOSTS=/etc/hosts
HOSTNAME=$1
IP=$2
HOSTS_LINE="$( echo -e "$IP\t${HOSTNAME}" )"
if grep -q -E "${IP}\s*${HOSTNAME}" /etc/hosts
then
echo " ✅ ${HOSTNAME} (${IP}) already exists"
else
echo " 🛠️ Adding ${HOSTNAME} (${IP}) to your $ETC_HOSTS";
sudo -- sh -c -e "echo '$HOSTS_LINE' >> /etc/hosts";
if grep -q -E "${IP}\s*${HOSTNAME}" /etc/hosts
then
echo " ✅ ${HOSTNAME} (${IP}) was added succesfully";
else
echo " 🛑 Failed to Add ${HOSTNAME} (${IP}), Try again!";
fi
fi
}
awk '$1 == "-"{ if (key == "aliases:") print $NF; next } {key=$1}' docker-compose.yml | \
sed "s/\${DOMAIN_SUFFIX}/${DOMAIN_SUFFIX}/" | \
while read -r line;
do
addhost "${line}" 127.0.0.1;
addhost "${line}" "::1";
done