Compare commits
133 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a3e7cb8f98 | |||
| cf972bda5b | |||
| d0cd17bec1 | |||
| dca6126821 | |||
| b8e5fbf009 | |||
| b76326091b | |||
| e3fe37cd33 | |||
| 45af524448 | |||
| 89056b296e | |||
| e8bb802e75 | |||
| 50d1c0bcf2 | |||
| 25ca003a3b | |||
| 1a9147752b | |||
| 3dd1fa683f | |||
| f7c23b8314 | |||
| 8bfdc126ee | |||
| cc486b822d | |||
| 889d3fc35b | |||
| ba19e35fc4 | |||
| 560d601e0c | |||
| 5542f4dbc7 | |||
| ea5d7d16ce | |||
| 752ff8acbe | |||
| f173a6845d | |||
| 46cbf35e81 | |||
| e04299fea3 | |||
| 7484705825 | |||
| 85e29f0484 | |||
| a6888980c7 | |||
| 1c959bb1a5 | |||
| eab8aa885d | |||
| e283b162dd | |||
| 30e1ba5149 | |||
| 0de5275c0f | |||
| 4dd09494d6 | |||
| 5bba062125 | |||
| 4de99ffc62 | |||
| 045cc34311 | |||
| 5e956a077f | |||
| b344090146 | |||
| 6e170559ed | |||
| adfd3806bb | |||
| 73421bface | |||
| 1ac94775ca | |||
| 2d37ab2918 | |||
| 78fb235225 | |||
| 4b403555aa | |||
| d9d3974415 | |||
| 2860d46798 | |||
| b2a76fc1f6 | |||
| e3a9dc0459 | |||
| 03ca6eea80 | |||
| 1891830657 | |||
| 57f577a814 | |||
| bf91888f13 | |||
| d36dd92875 | |||
| bb863522e1 | |||
| 31cbdb61e4 | |||
| ea54c4c0be | |||
| e580aa361a | |||
| 4ddcec964d | |||
| ca8b6e5b3b | |||
| ff8d0a71da | |||
| 4a126e2315 | |||
| e44f779ad7 | |||
| 021b499e2c | |||
| ff272e6996 | |||
| d8596f8952 | |||
| b288a4e70f | |||
| c6cde4483e | |||
| 00d1841aae | |||
| d25f34a3ab | |||
| 8c79c6a19d | |||
| 910003b41d | |||
| 5143ab180c | |||
| b152850c27 | |||
| b1a61e5bf1 | |||
| 498e2d7fd1 | |||
| 6f428e127e | |||
| fd359a79a3 | |||
| 50ecdc1efb | |||
| 73da9412e5 | |||
| c102f3af46 | |||
| a1c8f542ac | |||
| 27644f3899 | |||
| 853e7f9119 | |||
| b045f88aec | |||
| aa7fa3f914 | |||
| 11d047b004 | |||
| 29d78d5da5 | |||
| 809d54dbe0 | |||
| 57726da09a | |||
| 709fbd9cf0 | |||
| 18e065fa6d | |||
| 15b98dc9b5 | |||
| 8320a6012d | |||
| dc09074f34 | |||
| 4e54319120 | |||
| b777c14fa9 | |||
| 5a6ef75b63 | |||
| e941833242 | |||
| 6afcd1b4e8 | |||
| ccccc6bbdd | |||
| 2786901674 | |||
| 76676aadb1 | |||
| 5049660b77 | |||
| 564251f56e | |||
| 4118e9b59d | |||
| e6116acb7d | |||
| 9854a3c779 | |||
| 3c06fe3a22 | |||
| 6705dd98f4 | |||
| a5f404a4a2 | |||
| 42925f47ec | |||
| d43ebeea3e | |||
| df936789b1 | |||
| 0454d2c5be | |||
| 1ce9d8fff5 | |||
| cc210923e9 | |||
| a72e27b09f | |||
| 09f8437f33 | |||
| 71fc8c53dc | |||
| eab103d997 | |||
| 38fc67b345 | |||
| 03b5c188cb | |||
| 3b9ec4f8fd | |||
| 85f756d834 | |||
| c67644976d | |||
| b29a0cc0f5 | |||
| 0e768bf194 | |||
| f56d76cfa3 | |||
| d6b30a09cd | |||
| d4998c12e7 |
@@ -50,7 +50,7 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ matrix.container }}-buildx-${{ github.sha }}
|
||||
@@ -71,7 +71,7 @@ jobs:
|
||||
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@v6
|
||||
with:
|
||||
push: false
|
||||
context: docker/
|
||||
@@ -81,8 +81,49 @@ jobs:
|
||||
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}:${{ github.sha }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
- name: Start containers with docker compose
|
||||
run: |
|
||||
./bootstrap.sh
|
||||
PHP_VERSION=$(echo ${{ matrix.container }} | sed -e 's/^php//')
|
||||
echo "PHP_VERSION=${PHP_VERSION}" >> .env
|
||||
# exit if php version is not numeric or below 80
|
||||
if ! [[ $PHP_VERSION =~ ^[0-9]+$ ]] || [[ $PHP_VERSION -lt 80 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
docker compose up -d nextcloud
|
||||
# wait for nextcloud to be up
|
||||
# wait up to 5 minutes
|
||||
for i in {1..300}; do
|
||||
if curl -s http://nextcloud.local/index.php/login | grep -q 'Login'; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
curl http://nextcloud.local/status.php
|
||||
- uses: actions/setup-node@v4
|
||||
if: matrix.container == 'php81' || matrix.container == 'php82' || matrix.container == 'php83'
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Install dependencies
|
||||
if: matrix.container == 'php81' || matrix.container == 'php82' || matrix.container == 'php83'
|
||||
working-directory: tests
|
||||
run: npm ci
|
||||
- name: Install Playwright Browsers
|
||||
if: matrix.container == 'php81' || matrix.container == 'php82' || matrix.container == 'php83'
|
||||
working-directory: tests
|
||||
run: npx playwright install --with-deps
|
||||
- name: Run Playwright tests
|
||||
if: matrix.container == 'php81' || matrix.container == 'php82' || matrix.container == 'php83'
|
||||
working-directory: tests
|
||||
run: npx playwright test
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: matrix.container == 'php81' || matrix.container == 'php82' || matrix.container == 'php83'
|
||||
with:
|
||||
name: playwright-report
|
||||
path: tests/playwright-report/
|
||||
retention-days: 30
|
||||
- name: Push container image
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||
with:
|
||||
push: true
|
||||
@@ -90,13 +131,11 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: ${{ steps.dockerfile.outputs.DOCKERFILE }}
|
||||
tags: |
|
||||
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}:${{ github.event_name == 'release' && 'latest' || 'nightly' }}
|
||||
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}:${{ github.event_name == 'release' && github.ref || github.sha }}
|
||||
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}:${{ github.event_name == 'release' && 'release' || 'latest' }}
|
||||
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}:${{ github.ref_name }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
name: Publish MkDocs to GitHub Pages
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Single deploy job since we're just deploying
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install mkdocs mkdocs-material
|
||||
- name: Build MkDocs
|
||||
run: mkdocs build
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
# Upload entire repository
|
||||
path: './site'
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -14,3 +14,5 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run ShellCheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
env:
|
||||
SHELLCHECK_OPTS: -x
|
||||
|
||||
+14
-8
@@ -1,9 +1,15 @@
|
||||
data/ssl/
|
||||
data/shared/
|
||||
workspace/
|
||||
.env
|
||||
*.env
|
||||
/.vscode
|
||||
/data/ssl/
|
||||
/data/shared/
|
||||
/workspace/
|
||||
/.env
|
||||
/*.env
|
||||
!example.env
|
||||
.*
|
||||
data/skeleton/
|
||||
wip/
|
||||
/data/skeleton/
|
||||
/wip/
|
||||
/site
|
||||
node_modules/
|
||||
/tests/test-results/
|
||||
/tests/playwright-report/
|
||||
/tests/blob-report/
|
||||
/tests/playwright/.cache/
|
||||
|
||||
@@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
@@ -1,6 +1,6 @@
|
||||
SHELL := /bin/bash
|
||||
|
||||
.PHONY: images docker-build pull-all
|
||||
.PHONY: images docker-build pull-all docs docs-watch
|
||||
|
||||
.ONESHELL:
|
||||
images: docker/*/Dockerfile docker/Dockerfile.*
|
||||
@@ -42,8 +42,8 @@ dockerfilelint:
|
||||
|
||||
.ONESHELL:
|
||||
shellcheck:
|
||||
for file in $$(find . -type f -iname '*.sh' -not -path './wip/*'); do shellcheck --format=gcc $$file; done;
|
||||
for file in $$(find ./scripts -type f); do shellcheck --format=gcc $$file; done;
|
||||
for file in $$(find . -type f -iname '*.sh' -not -path './wip/*'); do shellcheck --format=gcc -x $$file; done;
|
||||
for file in $$(find ./scripts -type f); do shellcheck --format=gcc -x $$file; done;
|
||||
|
||||
.ONESHELL:
|
||||
template-apply:
|
||||
@@ -55,3 +55,11 @@ template-apply:
|
||||
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
|
||||
|
||||
docs:
|
||||
pip3 install mkdocs
|
||||
mkdocs
|
||||
|
||||
docs-watch:
|
||||
pip3 install mkdocs
|
||||
mkdocs serve
|
||||
|
||||
@@ -1,26 +1,69 @@
|
||||
# Nextcloud development environment on Docker Compose
|
||||
|
||||
Nextcloud development environment using docker-compose
|
||||
[Documentation](https://juliushaertl.github.io/nextcloud-docker-dev/) | [Nextcloud Developer Portal](https://nextcloud.com/developer/)
|
||||
|
||||
Nextcloud's development environment using Docker Compose providing a large variety of services for Nextcloud server and app development and testing.
|
||||
|
||||
⚠ **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
|
||||
|
||||
Features
|
||||
- ☁ Nextcloud containers for running multiple versions
|
||||
- 🐘 Multiple PHP versions
|
||||
- 🔒 Nginx proxy with optional SSL termination
|
||||
- 🛢️ MySQL/PostgreSQL/MariaDB/SQLite/MaxScale, Redis cache
|
||||
- 💾 Local or S3 primary storage
|
||||
- 👥 LDAP with example user data, Keycloak
|
||||
- ✉ Mailhog for testing mail sending
|
||||
- 🚀 Blackfire, Xdebug for profiling and debugging
|
||||
- 📄 Lots of integrating service containers: Collabora Online, Onlyoffice, Elasticsearch, ...
|
||||
|
||||
- ☁ Nextcloud
|
||||
- 🔒 Nginx proxy with SSL termination
|
||||
- 💾 MySQL
|
||||
- 💡 Redis
|
||||
- 👥 LDAP with example user data
|
||||
- ✉ Mailhog
|
||||
- 🚀 Blackfire
|
||||
- 📄 Collabora
|
||||
## Tutorial
|
||||
|
||||
You can find a step-by-step tutorial on how to use this setup in the [Nextcloud Developer Portal](https://nextcloud.com/developer/). It will guide you through the setup and show you how to use it for app development: https://cloud.nextcloud.com/s/iyNGp8ryWxc7Efa?path=%2F1%20Setting%20up%20a%20development%20environment
|
||||
|
||||
In detail explanation of the setup and its features and configuration options can be found in the [nextcloud-docker-dev documentation](https://juliushaertl.github.io/nextcloud-docker-dev/).
|
||||
|
||||
## Quickstart
|
||||
|
||||
### Persistent development setup
|
||||
|
||||
> [!TIP]
|
||||
> This is the recommended way to run the setup for development. You will have a local clone of all required source code.
|
||||
|
||||
To start the setup run the following commands to clone the repository and bootstrap the setup. This will prepare your setup and clone the Nextcloud server repository and required apps into the `workspace` folder.
|
||||
```bash
|
||||
git clone https://github.com/juliushaertl/nextcloud-docker-dev
|
||||
cd nextcloud-docker-dev
|
||||
./bootstrap.sh
|
||||
```
|
||||
|
||||
Depending on your docker version you will need to use `docker-compose` instead of `docker compose` in the following commands.
|
||||
|
||||
This may take some time depending on your internet connection speed.
|
||||
|
||||
Once done you can start the Nextcloud container using:
|
||||
```bash
|
||||
docker compose up nextcloud
|
||||
```
|
||||
|
||||
You can also start it in the background using `docker compose up -d nextcloud`.
|
||||
|
||||
You can then access your Nextcloud instance at [http://nextcloud.local](http://nextcloud.local). The default username is `admin` and the password is `admin`. [Other users can be found in the documentation](https://juliushaertl.github.io/nextcloud-docker-dev/basics/overview/#default-users).
|
||||
|
||||
> [!WARN]
|
||||
> 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
|
||||
> git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
|
||||
> git fetch origin
|
||||
> ```
|
||||
|
||||
|
||||
## Standalone containers
|
||||
### Standalone containers
|
||||
|
||||
::: 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
|
||||
:::
|
||||
> [!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.
|
||||
|
||||
@@ -40,7 +83,7 @@ For app development you can mount your app directly into the container:
|
||||
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.
|
||||
The `SERVER_BRANCH` environment variable can be used to run different versions of Nextcloud by specifying 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
|
||||
@@ -51,477 +94,10 @@ You can also mount your local server source code into the container to run a loc
|
||||
```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
|
||||
## More features
|
||||
|
||||
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
|
||||
```
|
||||
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:
|
||||
You can find documentation for more advanced features in [nextcloud-docker-dev documentation](https://juliushaertl.github.io/nextcloud-docker-dev/) for example:
|
||||
|
||||
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.
|
||||
|
||||
## Additional apps
|
||||
|
||||
To install additional apps add them to the bootstrap command:
|
||||
|
||||
```bash
|
||||
./bootstrap.sh circles contacts
|
||||
```
|
||||
|
||||
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`.
|
||||
|
||||
## Complex setup
|
||||
|
||||
In order to achieve a more complex dev environment with different branches of the server, follow the manual steps:
|
||||
|
||||
##### 1. Create a workspace folder and clone the server repository
|
||||
|
||||
```
|
||||
mkdir workspace && cd workspace
|
||||
git clone https://github.com/nextcloud/server.git
|
||||
```
|
||||
|
||||
##### 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
|
||||
|
||||
```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`
|
||||
|
||||
|
||||
|
||||
## 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-compose up proxy nextcloud minio
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### OCC
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
### Useful commands
|
||||
|
||||
- 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>`
|
||||
|
||||
## [Keycloak](https://www.keycloak.org/)
|
||||
|
||||
- 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
|
||||
|
||||
```
|
||||
docker-compose up -d proxy portal gs1 gs2 lookup database-mysql
|
||||
```
|
||||
|
||||
Users are named the same as the instance name, e.g. `gs1`, `gs2`
|
||||
|
||||
## Imaginary
|
||||
|
||||
Enable the imaginary server for generating previews
|
||||
|
||||
```bash
|
||||
docker-compose up proxy nextcloud previews_hpb
|
||||
./scripts/enable-preview-imaginary.sh
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
```
|
||||
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.
|
||||
|
||||
```
|
||||
docker-compose up -d pgadmin
|
||||
```
|
||||
|
||||
Add the domain to your `/etc/hosts` file:
|
||||
|
||||
```
|
||||
sudo sh -c "echo '127.0.0.1 pgadmin.local' >> /etc/hosts"
|
||||
```
|
||||
|
||||
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`
|
||||
- Running stable Nextcloud versions in parallel
|
||||
- Using different database backends
|
||||
- Using HTTPS
|
||||
|
||||
+166
-19
@@ -4,13 +4,122 @@ set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
APPS_TO_INSTALL=(viewer recommendations files_pdfviewer profiler hmr_enabler)
|
||||
APPS_TO_INSTALL=(viewer recommendations files_pdfviewer profiler hmr_enabler circles)
|
||||
NEXTCLOUD_AUTOINSTALL_APPS=(viewer profiler hmr_enabler)
|
||||
SERVER_CLONE=squashed
|
||||
APPS_CLONE_FILTER=
|
||||
|
||||
print_help() {
|
||||
cat << EOF
|
||||
boottrap.sh [--full-clone|--clone-no-blobs] [--clone-all-apps-filtered] [--] APPS
|
||||
|
||||
This command will initialize the debug environment for app developers.
|
||||
|
||||
The following options can be provided:
|
||||
|
||||
--full-clone Clone the server repository with the complete history included
|
||||
--clone-no-blobs Clone the server repository with the history but omitting the
|
||||
file contents. A network connection might be required if checking
|
||||
out commits is done.
|
||||
--full-clone and --clone-no-blobs is mutually exclusive.
|
||||
--clone-all-apps-filtered
|
||||
Do not only reduce the history of the server repository but also
|
||||
the cloned apps.
|
||||
|
||||
APPS The apps to add to the development setup on top of the default apps
|
||||
|
||||
The default apps to be installed: ${APPS_TO_INSTALL[@]}
|
||||
EOF
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
--full-clone)
|
||||
SERVER_CLONE=full
|
||||
;;
|
||||
--clone-no-blobs)
|
||||
SERVER_CLONE=filter-blobs
|
||||
;;
|
||||
--clone-all-apps-filtered)
|
||||
APPS_CLONE_FILTER=y
|
||||
;;
|
||||
--help|-h)
|
||||
print_help
|
||||
exit 0
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
APPS_TO_INSTALL+=("$1")
|
||||
NEXTCLOUD_AUTOINSTALL_APPS+=("$1")
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# You can specify additional apps to install on the command line.
|
||||
APPS_TO_INSTALL+=( "$@" )
|
||||
NEXTCLOUD_AUTOINSTALL_APPS+=( "$@" )
|
||||
|
||||
# Already executed
|
||||
if [ -f ".env" ]; then
|
||||
echo "⏩ .env file found, so assuming you already ran this script."
|
||||
echo " Validating the setup"
|
||||
# shellcheck disable=SC1091
|
||||
source .env
|
||||
|
||||
set +o errexit
|
||||
echo "Server master repository path: ${REPO_PATH_SERVER}"
|
||||
REPO_VERSION=$(grep "OC_VersionString" "${REPO_PATH_SERVER}/version.php" | cut -d "'" -f 2)
|
||||
if [ -d "$REPO_PATH_SERVER" ] && [ -n "$REPO_VERSION" ]; then
|
||||
echo "✅ $REPO_VERSION"
|
||||
elif [ -z "$REPO_VERSION" ]; then
|
||||
echo "❌ Repository version.php cannot be detected"
|
||||
else
|
||||
echo "❌ Repository path does not exist"
|
||||
fi
|
||||
|
||||
for i in stable26 stable27 stable28
|
||||
do
|
||||
echo "Stable $i repository path: ${STABLE_ROOT_PATH}/${i}"
|
||||
STABLE_VERSION=$(grep "OC_VersionString" "${STABLE_ROOT_PATH}/${i}/version.php" | cut -d "'" -f 2)
|
||||
if [ -d "${STABLE_ROOT_PATH}/${i}" ] && [ -n "$STABLE_VERSION" ]; then
|
||||
echo "✅ $STABLE_VERSION"
|
||||
elif [ -z "$REPO_VERSION" ]; then
|
||||
echo "❌ $i version.php cannot be detected"
|
||||
else
|
||||
echo "❌ $i repository path does not exist"
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case $SERVER_CLONE in
|
||||
squashed)
|
||||
CLONE_PARAMS=(--depth 1)
|
||||
;;
|
||||
clone-no-blobs)
|
||||
CLONE_PARAMS=(--filter blob:none)
|
||||
;;
|
||||
full)
|
||||
CLONE_PARAMS=()
|
||||
;;
|
||||
*)
|
||||
echo "Unknown cloning parameter $SERVER_CLONE was found. Please report this."
|
||||
exit 1
|
||||
esac
|
||||
|
||||
if [ -n "$APPS_CLONE_FILTER" ]
|
||||
then
|
||||
APPS_CLONE_PARAMS=("${CLONE_PARAMS[@]}")
|
||||
else
|
||||
APPS_CLONE_PARAMS=()
|
||||
fi
|
||||
|
||||
indent() {
|
||||
sed 's/^/ /'
|
||||
}
|
||||
@@ -32,8 +141,8 @@ function install_server() {
|
||||
(
|
||||
(
|
||||
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
|
||||
git clone ${CLONE_PARAMS[@]+"${CLONE_PARAMS[@]}"} https://github.com/nextcloud/server.git --depth 1 workspace/server --progress 2>&1 &&
|
||||
cd workspace/server && git submodule update --init --progress 2>&1
|
||||
) || echo "❌ Failed to clone Nextcloud server code"
|
||||
) | indent
|
||||
}
|
||||
@@ -46,7 +155,7 @@ function install_app() {
|
||||
fi
|
||||
(
|
||||
echo "🌏 Fetching $1"
|
||||
(git clone https://github.com/nextcloud/"$1".git "$TARGET" 2>&1 | indent_cli &&
|
||||
(git clone ${APPS_CLONE_PARAMS[@]+"${APPS_CLONE_PARAMS[@]}"} https://github.com/nextcloud/"$1".git "$TARGET" 2>&1 | indent_cli &&
|
||||
echo "✅ $1 installed") ||
|
||||
echo "❌ Failed to install $1"
|
||||
) | indent
|
||||
@@ -67,23 +176,22 @@ echo
|
||||
echo "⏩ Performing system checks"
|
||||
|
||||
is_installed docker
|
||||
is_installed docker-compose
|
||||
is_installed git
|
||||
|
||||
DCC=
|
||||
docker-compose version >/dev/null 2>/dev/null && DCC='docker-compose'
|
||||
docker compose version >/dev/null 2>/dev/null && DCC='docker compose'
|
||||
|
||||
if [ -z "$DCC" ]; then
|
||||
echo "❌ Install docker-compose before running this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(
|
||||
(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
|
||||
|
||||
|
||||
echo
|
||||
echo
|
||||
@@ -101,11 +209,13 @@ 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"
|
||||
PRIMARY=local
|
||||
# other values: "database-pgsql"
|
||||
EOT
|
||||
fi
|
||||
|
||||
./scripts/update-hosts
|
||||
|
||||
if [[ $(uname -m) == 'arm64' ]]; then
|
||||
echo "Setting custom containers for arm platform"
|
||||
|
||||
@@ -113,6 +223,15 @@ if [[ $(uname -m) == 'arm64' ]]; then
|
||||
echo "CONTAINER_KEYCLOAK=mihaibob/keycloak:15.0.1" >> .env
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
cat <<EOF
|
||||
|
||||
|
||||
@@ -122,18 +241,22 @@ cat <<EOF
|
||||
|
||||
🚀 Start the Nextcloud server by running
|
||||
|
||||
$ docker-compose up -d nextcloud
|
||||
$ $DCC up -d nextcloud
|
||||
|
||||
|
||||
💤 Stop it with
|
||||
|
||||
$ docker-compose stop nextcloud
|
||||
$ $DCC stop nextcloud
|
||||
|
||||
|
||||
🗑 Fresh install and wipe all data
|
||||
|
||||
$ docker-compose down -v
|
||||
$ $DCC down -v
|
||||
EOF
|
||||
|
||||
case $SERVER_CLONE in
|
||||
squashed)
|
||||
cat <<EOF
|
||||
|
||||
Note that for performance reasons the server repository has been cloned with
|
||||
--depth=1. To get the full history it is highly recommended to run:
|
||||
@@ -145,6 +268,30 @@ cat <<EOF
|
||||
|
||||
This may take some time depending on your internet connection speed.
|
||||
|
||||
You might as well use the script in scripts/download-full-history.sh.
|
||||
EOF
|
||||
;;
|
||||
clone-no-blobs)
|
||||
cat <<EOF
|
||||
|
||||
Note that for performance reasons the server repository has been cloned with
|
||||
--filter=blob:none. You have a complete history in the server repository.
|
||||
If you checkout older commits, git will eventually download missing blobs on
|
||||
the fly if they are not present locally.
|
||||
|
||||
You should be prepared to have a live internet connection when browsing the
|
||||
history of the server repository.
|
||||
|
||||
You might as well use the script in scripts/download-full-history.sh.
|
||||
EOF
|
||||
;;
|
||||
full)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
cat <<EOF
|
||||
|
||||
For more details about the individual setup options see
|
||||
the README.md file or checkout the repo at
|
||||
|
||||
@@ -1,68 +1,4 @@
|
||||
<?php
|
||||
// FIXME: Move everything except the last part to the containers
|
||||
// set the hostname to the VIRTUAL_HOST set for the docker container, otherwise fallback to the docker hostname
|
||||
$hostname = gethostname();
|
||||
$primary = isset($_ENV['PRIMARY']) ? $_ENV['PRIMARY'] : '';
|
||||
$virtualHost = isset($_ENV['VIRTUAL_HOST']) ? $_ENV['VIRTUAL_HOST'] : '';
|
||||
$virtualHost = explode(".", $virtualHost);
|
||||
if (count($virtualHost) > 0) {
|
||||
$hostname = array_shift($virtualHost);
|
||||
}
|
||||
|
||||
$CONFIG = [];
|
||||
if ($primary === 'minio') {
|
||||
$CONFIG += [
|
||||
'objectstore' =>
|
||||
array (
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' =>
|
||||
array (
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'minio',
|
||||
'port' => '9000',
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
'autocreate' => true,
|
||||
'verify_bucket_exists' => true,
|
||||
),
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
if ($primary === 'minio-multibucket') {
|
||||
$CONFIG += [
|
||||
'objectstore_multibucket' => array(
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array(
|
||||
// optional, defaults to 64
|
||||
'num_buckets' => 64,
|
||||
// n integer in the range from 0 to (num_buckets-1) will be appended
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'minio',
|
||||
'port' => '9000',
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
// Useful config values during development
|
||||
$CONFIG += array(
|
||||
'debug' => true,
|
||||
'loglevel' => 2,
|
||||
|
||||
// 'htaccess.RewriteBase' => '/',
|
||||
'log_query' => false,
|
||||
'query_log_file' => '/var/www/html/data/query.log',
|
||||
|
||||
'diagnostics.logging' => false,
|
||||
'diagnostics.logging.threshold' => 0,
|
||||
'log.condition' => [
|
||||
'apps' => ['diagnostics', 'admin_audit'],
|
||||
],
|
||||
// This file is deprecated, please put your custom config in data/shared/config.php from now on
|
||||
$CONFIG = array(
|
||||
);
|
||||
|
||||
@@ -1 +1 @@
|
||||
nextcloud.local:5432:database-postgres:postgres:postgres
|
||||
nextcloud.local:5432:database-pgsql:postgres:postgres
|
||||
@@ -5,7 +5,7 @@
|
||||
"Group": "Server Group 1",
|
||||
"Port": 5432,
|
||||
"Username": "postgres",
|
||||
"Host": "database-postgres",
|
||||
"Host": "database-pgsql",
|
||||
"SSLMode": "prefer",
|
||||
"MaintenanceDB": "postgres",
|
||||
"PassFile": "/pgadmin4/config/pgpassfile"
|
||||
|
||||
@@ -13,7 +13,7 @@ use cases
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
echo "🎉🎉🎉🎉🎉🎉🎉🎉 triggered hook before-start.sh"
|
||||
echo "🤖 triggered hook before-start.sh"
|
||||
env
|
||||
export OC_PASS="mycustomuser"
|
||||
occ user:add --password-from-env mycustomuser
|
||||
|
||||
+215
-78
@@ -38,6 +38,7 @@ services:
|
||||
- stable26${DOMAIN_SUFFIX}
|
||||
- stable27${DOMAIN_SUFFIX}
|
||||
- stable28${DOMAIN_SUFFIX}
|
||||
- stable29${DOMAIN_SUFFIX}
|
||||
- mail${DOMAIN_SUFFIX}
|
||||
- collabora${DOMAIN_SUFFIX}
|
||||
- codedev${DOMAIN_SUFFIX}
|
||||
@@ -55,6 +56,7 @@ services:
|
||||
- pgadmin${DOMAIN_SUFFIX}
|
||||
- phpmyadmin${DOMAIN_SUFFIX}
|
||||
- talk-signaling${DOMAIN_SUFFIX}
|
||||
- talk-recording${DOMAIN_SUFFIX}
|
||||
|
||||
haproxy:
|
||||
image: haproxy
|
||||
@@ -65,11 +67,19 @@ services:
|
||||
volumes:
|
||||
- ./docker/configs/haproxy.conf:/usr/local/etc/haproxy/haproxy.cfg:ro
|
||||
|
||||
dockersocketproxy:
|
||||
image: ghcr.io/cloud-py-api/nextcloud-appapi-dsp:release
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
privileged: true
|
||||
environment:
|
||||
NC_HAPROXY_PASSWORD: secret
|
||||
|
||||
nextcloud:
|
||||
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
|
||||
environment:
|
||||
SQL: ${SQL:-mysql}
|
||||
NEXTCLOUD_AUTOINSTALL: "YES"
|
||||
NEXTCLOUD_AUTOINSTALL: ${NEXTCLOUD_AUTOINSTALL:-YES}
|
||||
NEXTCLOUD_AUTOINSTALL_APPS:
|
||||
WITH_REDIS: "YES"
|
||||
VIRTUAL_HOST: "nextcloud${DOMAIN_SUFFIX}"
|
||||
@@ -77,7 +87,7 @@ services:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS:
|
||||
BLACKFIRE_CLIENT_ID:
|
||||
BLACKFIRE_CLIENT_TOKEN:
|
||||
PRIMARY: ${PRIMARY}
|
||||
PRIMARY: ${PRIMARY:-local}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${REPO_PATH_SERVER}:/var/www/html'
|
||||
@@ -85,17 +95,15 @@ services:
|
||||
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
|
||||
- data:/var/www/html/data
|
||||
- config:/var/www/html/config
|
||||
- /var/www/html/apps-writable
|
||||
- apps-writable:/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}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -107,16 +115,21 @@ services:
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${REPO_PATH_SERVER}:/var/www/html'
|
||||
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
|
||||
- '${REPO_PATH_SERVER}/apps-extra:/var/www/html/apps-extra'
|
||||
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
|
||||
- data2:/var/www/html/data
|
||||
- config2:/var/www/html/config
|
||||
- apps-writable2:/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}1:80"
|
||||
depends_on:
|
||||
- database-mysql
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -128,15 +141,19 @@ services:
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${REPO_PATH_SERVER}:/var/www/html'
|
||||
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
|
||||
- '${REPO_PATH_SERVER}/apps-extra:/var/www/html/apps-extra'
|
||||
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
|
||||
- data3:/var/www/html/data
|
||||
- config3:/var/www/html/config
|
||||
- apps-writable3:/var/www/html/apps-writable
|
||||
- ./data/skeleton/:/skeleton
|
||||
- ./docker/configs/config.php:/var/www/html/config/writable.config.php:ro
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
- ./data/shared:/shared
|
||||
depends_on:
|
||||
- database-mysql
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -162,10 +179,10 @@ services:
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
- ./data/shared:/shared
|
||||
depends_on:
|
||||
- ${DB_SERVICE:-database-mysql}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -190,13 +207,11 @@ services:
|
||||
- ./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}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -221,13 +236,11 @@ services:
|
||||
- ./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}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -252,13 +265,11 @@ services:
|
||||
- ./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}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -283,13 +294,11 @@ services:
|
||||
- ./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}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -303,7 +312,7 @@ services:
|
||||
VIRTUAL_HOST: stable21${DOMAIN_SUFFIX}
|
||||
ADDITIONAL_APPS_PATH:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS:
|
||||
PRIMARY: ${PRIMARY}
|
||||
PRIMARY: ${PRIMARY:-local}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${STABLE_ROOT_PATH}/stable21:/var/www/html'
|
||||
@@ -315,13 +324,11 @@ services:
|
||||
- ./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}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -335,7 +342,7 @@ services:
|
||||
VIRTUAL_HOST: stable22${DOMAIN_SUFFIX}
|
||||
ADDITIONAL_APPS_PATH:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS:
|
||||
PRIMARY: ${PRIMARY}
|
||||
PRIMARY: ${PRIMARY:-local}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${STABLE_ROOT_PATH}/stable22:/var/www/html'
|
||||
@@ -348,10 +355,10 @@ services:
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
- ./data/shared:/shared
|
||||
depends_on:
|
||||
- ${DB_SERVICE:-database-mysql}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -365,7 +372,7 @@ services:
|
||||
VIRTUAL_HOST: stable23${DOMAIN_SUFFIX}
|
||||
ADDITIONAL_APPS_PATH:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS:
|
||||
PRIMARY: ${PRIMARY}
|
||||
PRIMARY: ${PRIMARY:-local}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${STABLE_ROOT_PATH}/stable23:/var/www/html'
|
||||
@@ -377,13 +384,11 @@ services:
|
||||
- ./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}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -397,7 +402,7 @@ services:
|
||||
VIRTUAL_HOST: stable24${DOMAIN_SUFFIX}
|
||||
ADDITIONAL_APPS_PATH:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS:
|
||||
PRIMARY: ${PRIMARY}
|
||||
PRIMARY: ${PRIMARY:-local}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${STABLE_ROOT_PATH}/stable24:/var/www/html'
|
||||
@@ -410,10 +415,10 @@ services:
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
- ./data/shared:/shared
|
||||
depends_on:
|
||||
- ${DB_SERVICE:-database-mysql}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -427,7 +432,7 @@ services:
|
||||
VIRTUAL_HOST: stable25${DOMAIN_SUFFIX}
|
||||
ADDITIONAL_APPS_PATH:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS:
|
||||
PRIMARY: ${PRIMARY}
|
||||
PRIMARY: ${PRIMARY:-local}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${STABLE_ROOT_PATH}/stable25:/var/www/html'
|
||||
@@ -440,10 +445,10 @@ services:
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
- ./data/shared:/shared
|
||||
depends_on:
|
||||
- ${DB_SERVICE:-database-mysql}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -457,7 +462,7 @@ services:
|
||||
VIRTUAL_HOST: stable26${DOMAIN_SUFFIX}
|
||||
ADDITIONAL_APPS_PATH:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS:
|
||||
PRIMARY: ${PRIMARY}
|
||||
PRIMARY: ${PRIMARY:-local}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${STABLE_ROOT_PATH}/stable26:/var/www/html'
|
||||
@@ -470,10 +475,10 @@ services:
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
- ./data/shared:/shared
|
||||
depends_on:
|
||||
- ${DB_SERVICE:-database-mysql}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -487,7 +492,7 @@ services:
|
||||
VIRTUAL_HOST: stable27${DOMAIN_SUFFIX}
|
||||
ADDITIONAL_APPS_PATH:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS:
|
||||
PRIMARY: ${PRIMARY}
|
||||
PRIMARY: ${PRIMARY:-local}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${STABLE_ROOT_PATH}/stable27:/var/www/html'
|
||||
@@ -500,10 +505,10 @@ services:
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
- ./data/shared:/shared
|
||||
depends_on:
|
||||
- ${DB_SERVICE:-database-mysql}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -517,7 +522,7 @@ services:
|
||||
VIRTUAL_HOST: stable28${DOMAIN_SUFFIX}
|
||||
ADDITIONAL_APPS_PATH:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS:
|
||||
PRIMARY: ${PRIMARY}
|
||||
PRIMARY: ${PRIMARY:-local}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${STABLE_ROOT_PATH}/stable28:/var/www/html'
|
||||
@@ -530,10 +535,40 @@ services:
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
- ./data/shared:/shared
|
||||
depends_on:
|
||||
- ${DB_SERVICE:-database-mysql}
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
stable29:
|
||||
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: stable29${DOMAIN_SUFFIX}
|
||||
ADDITIONAL_APPS_PATH:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS:
|
||||
PRIMARY: ${PRIMARY:-local}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
|
||||
volumes:
|
||||
- '${STABLE_ROOT_PATH}/stable29:/var/www/html'
|
||||
- '${STABLE_ROOT_PATH}/stable29/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:
|
||||
- database-${SQL:-mysql}
|
||||
- redis
|
||||
- mail
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
@@ -547,23 +582,75 @@ services:
|
||||
MYSQL_PASSWORD: 'nextcloud'
|
||||
MYSQL_USER: 'nextcloud'
|
||||
MYSQL_DATABASE: 'nextcloud'
|
||||
command: [
|
||||
'--wait_timeout=28800',
|
||||
]
|
||||
ports:
|
||||
- "${PORTBASE:-800}2:3306"
|
||||
volumes:
|
||||
- mysql:/var/lib/mysql
|
||||
|
||||
database-postgres:
|
||||
database-mariadb-primary:
|
||||
image: docker.io/bitnami/mariadb:10.6
|
||||
ports:
|
||||
- '3306'
|
||||
volumes:
|
||||
- 'mariadb_primary_data:/bitnami/mariadb'
|
||||
environment:
|
||||
- MARIADB_REPLICATION_MODE=master
|
||||
- MARIADB_REPLICATION_USER=repl_user
|
||||
- MARIADB_REPLICATION_PASSWORD=repl_password
|
||||
- MARIADB_ROOT_PASSWORD=nextcloud
|
||||
- MARIADB_USER=nextcloud
|
||||
- MARIADB_PASSWORD=nextcloud
|
||||
- MARIADB_DATABASE=nextcloud
|
||||
|
||||
database-mariadb-replica:
|
||||
image: docker.io/bitnami/mariadb:10.6
|
||||
ports:
|
||||
- '3306'
|
||||
depends_on:
|
||||
- database-mariadb-primary
|
||||
environment:
|
||||
- MARIADB_REPLICATION_MODE=slave
|
||||
- MARIADB_REPLICATION_USER=repl_user
|
||||
- MARIADB_REPLICATION_PASSWORD=repl_password
|
||||
- MARIADB_MASTER_HOST=database-mariadb-primary
|
||||
- MARIADB_MASTER_PORT_NUMBER=3306
|
||||
- MARIADB_MASTER_ROOT_PASSWORD=nextcloud
|
||||
# This can be useful for testing but should be enabled only after a setup is completed
|
||||
# - MARIADB_MASTER_DELAY=10
|
||||
|
||||
database-maxscale:
|
||||
image: mariadb/maxscale:latest
|
||||
depends_on:
|
||||
- database-mariadb-primary
|
||||
- database-mariadb-replica
|
||||
volumes:
|
||||
- './docker/maxscale/my-maxscale.cnf:/etc/maxscale.cnf.d/my-maxscale.cnf'
|
||||
ports:
|
||||
- '3306'
|
||||
|
||||
database-pgsql:
|
||||
image: postgres:latest
|
||||
environment:
|
||||
POSTGRES_DB: nextcloud
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
expose:
|
||||
- 5432
|
||||
- "${PORTBASE:-800}2:5432"
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql
|
||||
|
||||
database-oci:
|
||||
image: ghcr.io/gvenzl/oracle-xe:21
|
||||
environment:
|
||||
ORACLE_PASSWORD: nextcloud
|
||||
APP_USER: nextcloud
|
||||
APP_USER_PASSWORD: nextcloud
|
||||
ORACLE_DATABASE: nextcloud
|
||||
ports:
|
||||
- 1521:1521/tcp
|
||||
|
||||
pgadmin:
|
||||
container_name: pgadmin_container
|
||||
image: dpage/pgadmin4
|
||||
@@ -577,10 +664,12 @@ services:
|
||||
volumes:
|
||||
- "./data/pgadmin/config:/pgadmin4/config"
|
||||
depends_on:
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
|
||||
redis:
|
||||
image: redis:7
|
||||
volumes:
|
||||
- redis:/data
|
||||
|
||||
ldap:
|
||||
image: osixia/openldap
|
||||
@@ -670,17 +759,18 @@ services:
|
||||
aliasgroup2: http://gs1${DOMAIN_SUFFIX}
|
||||
aliasgroup3: http://gs2${DOMAIN_SUFFIX}
|
||||
aliasgroup4: http://stable20${DOMAIN_SUFFIX}
|
||||
aliasgroup5: http://stable26${DOMAIN_SUFFIX}
|
||||
aliasgroup6: http://stable22${DOMAIN_SUFFIX}
|
||||
aliasgroup7: http://stable23${DOMAIN_SUFFIX}
|
||||
aliasgroup8: http://stable24${DOMAIN_SUFFIX}
|
||||
aliasgroup9: http://stable25${DOMAIN_SUFFIX}
|
||||
aliasgroup5: http://stable24${DOMAIN_SUFFIX}
|
||||
aliasgroup6: http://stable25${DOMAIN_SUFFIX}
|
||||
aliasgroup7: http://stable26${DOMAIN_SUFFIX}
|
||||
aliasgroup8: http://stable27${DOMAIN_SUFFIX}
|
||||
aliasgroup9: http://stable28${DOMAIN_SUFFIX}
|
||||
dictionaries: de_DE en_US en_GB
|
||||
username: admin
|
||||
password: admin
|
||||
VIRTUAL_HOST: collabora${DOMAIN_SUFFIX}
|
||||
VIRTUAL_PORT: 9980
|
||||
VIRTUAL_PROTO: http
|
||||
server_name: collabora${DOMAIN_SUFFIX}
|
||||
extra_params: "--o:ssl.enable=false --o:net.frame_ancestors=*${DOMAIN_SUFFIX} --o:home_mode.enable=true --o:ssl.termination=false ${COLLABORA_PARAMS:-}"
|
||||
|
||||
codedev:
|
||||
@@ -700,6 +790,7 @@ services:
|
||||
environment:
|
||||
VIRTUAL_HOST: onlyoffice${DOMAIN_SUFFIX}
|
||||
USE_UNAUTHORIZED_STORAGE: "true"
|
||||
JWT_SECRET: secret
|
||||
expose:
|
||||
- '80'
|
||||
volumes:
|
||||
@@ -713,7 +804,7 @@ services:
|
||||
VIRTUAL_PORT: 9001
|
||||
MINIO_ROOT_USER: nextcloud
|
||||
MINIO_ROOT_PASSWORD: nextcloud
|
||||
MINIO_BROWSER_REDIRECT_URL: http://minio${DOMAIN_SUFFIX}
|
||||
MINIO_BROWSER_REDIRECT_URL: ${PROTOCOL}://minio${DOMAIN_SUFFIX}
|
||||
volumes:
|
||||
- objectstorage_minio:/data
|
||||
command: server /data --console-address :9001
|
||||
@@ -765,7 +856,7 @@ services:
|
||||
NEXTCLOUD_URL: http://nextcloud
|
||||
|
||||
keycloak:
|
||||
image: quay.io/keycloak/keycloak:23.0
|
||||
image: quay.io/keycloak/keycloak:25.0
|
||||
expose:
|
||||
- 8080
|
||||
volumes:
|
||||
@@ -800,8 +891,8 @@ services:
|
||||
- ./data/skeleton/:/skeleton
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
depends_on:
|
||||
- proxy
|
||||
- database-mysql
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
- database-${SQL:-mysql}
|
||||
- lookup
|
||||
- redis
|
||||
- mail
|
||||
@@ -822,9 +913,9 @@ services:
|
||||
- ./data/skeleton/:/skeleton
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
depends_on:
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
- portal
|
||||
- database-mysql
|
||||
- database-${SQL:-mysql}
|
||||
- lookup
|
||||
- redis
|
||||
- mail
|
||||
@@ -845,9 +936,9 @@ services:
|
||||
- ./data/skeleton/:/skeleton
|
||||
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
|
||||
depends_on:
|
||||
- proxy
|
||||
- ${PROXY_SERVICE:-proxy}
|
||||
- portal
|
||||
- database-mysql
|
||||
- database-${SQL:-mysql}
|
||||
- lookup
|
||||
- redis
|
||||
- mail
|
||||
@@ -862,6 +953,30 @@ services:
|
||||
# - '${STABLE_ROOT_PATH}/lookupserver:/var/www/html'
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
tinyproxy:
|
||||
image: docker.io/kalaksi/tinyproxy
|
||||
cap_drop:
|
||||
- ALL
|
||||
ports:
|
||||
- 8888:8888
|
||||
environment:
|
||||
MAX_CLIENTS: 100
|
||||
ALLOWED_NETWORKS: 0.0.0.0/0
|
||||
# One of Critical, Error, Warning, Notice, Connect, Info
|
||||
LOG_LEVEL: Notice
|
||||
# Maximum number of seconds idle connections are allowed to remain open
|
||||
TIMEOUT: 900
|
||||
# Username for BasicAuth
|
||||
# AUTH_USER: ''
|
||||
# Password for BasicAuth (letters and digits only)
|
||||
# Prefer secrets-mechanisms instead of environment variables.
|
||||
# AUTH_PASSWORD: ''
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-I", "-H", "Host: tinyproxy.stats", "${PROTOCOL}://nextcloud${DOMAIN_SUFFIX}/"]
|
||||
interval: 5m
|
||||
timeout: 10s
|
||||
retries: 1
|
||||
|
||||
|
||||
previews_hpb:
|
||||
image: nextcloud/aio-imaginary:latest
|
||||
@@ -887,13 +1002,34 @@ services:
|
||||
talk-janus:
|
||||
image: ghcr.io/juliushaertl/nextcloud-dev-talk-janus:latest
|
||||
|
||||
talk-recording:
|
||||
image: nextcloud/aio-talk-recording:latest
|
||||
environment:
|
||||
NC_DOMAIN: "nextcloud${DOMAIN_SUFFIX}"
|
||||
ALLOW_ALL: "true"
|
||||
HPB_PROTOCOL: "${PROTOCOL:-http}"
|
||||
HPB_DOMAIN: "talk-signaling${DOMAIN_SUFFIX}"
|
||||
HPB_PATH : ""
|
||||
SKIP_VERIFY: "true"
|
||||
RECORDING_SECRET: "6789"
|
||||
INTERNAL_SECRET: "4567"
|
||||
VIRTUAL_HOST: "talk-recording${DOMAIN_SUFFIX}"
|
||||
VIRTUAL_PORT: 1234
|
||||
shm_size: 2147483648
|
||||
|
||||
volumes:
|
||||
data:
|
||||
config:
|
||||
apps-writable:
|
||||
mysql:
|
||||
postgres:
|
||||
redis:
|
||||
data2:
|
||||
config2:
|
||||
apps-writable2:
|
||||
data3:
|
||||
config3:
|
||||
apps-writable3:
|
||||
document_data:
|
||||
document_log:
|
||||
objectstorage_minio:
|
||||
@@ -901,6 +1037,7 @@ volumes:
|
||||
smbhomes:
|
||||
elasticsearch_data:
|
||||
clam:
|
||||
mariadb_primary_data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
|
||||
@@ -7,13 +7,14 @@ RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions \
|
||||
apcu \
|
||||
bcmath \
|
||||
blackfire \
|
||||
excimer \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
imagick \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
oci8 \
|
||||
opcache \
|
||||
pcntl \
|
||||
@@ -24,26 +25,28 @@ RUN install-php-extensions \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
zip \
|
||||
blackfire \
|
||||
@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 \
|
||||
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync mariadb-client \
|
||||
&& 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
|
||||
&& chmod +x /usr/local/bin/phpunit9 \
|
||||
&& ln -s /usr/local/bin/phpunit9 /usr/local/bin/phpunit
|
||||
|
||||
# Install NVM (Fermium = v14, Gallium = v16)
|
||||
# Install NVM
|
||||
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
|
||||
&& nvm install 14 && nvm install 16 && nvm install 20 \
|
||||
&& nvm alias default 20
|
||||
|
||||
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
|
||||
|
||||
RUN { \
|
||||
@@ -65,9 +68,8 @@ 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) \
|
||||
&& mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled \
|
||||
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini) \
|
||||
|| echo "Skipped blackfire as the installation failed" \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -95,5 +97,5 @@ 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/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
+13
-11
@@ -7,13 +7,14 @@ RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions \
|
||||
apcu \
|
||||
bcmath \
|
||||
blackfire \
|
||||
excimer \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
imagick \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
oci8 \
|
||||
opcache \
|
||||
pcntl \
|
||||
@@ -24,26 +25,28 @@ RUN install-php-extensions \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
zip \
|
||||
blackfire \
|
||||
@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 \
|
||||
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync mariadb-client \
|
||||
&& 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
|
||||
&& chmod +x /usr/local/bin/phpunit9 \
|
||||
&& ln -s /usr/local/bin/phpunit9 /usr/local/bin/phpunit
|
||||
|
||||
# Install NVM (Fermium = v14, Gallium = v16)
|
||||
# Install NVM
|
||||
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
|
||||
&& nvm install 14 && nvm install 16 && nvm install 20 \
|
||||
&& nvm alias default 20
|
||||
|
||||
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
|
||||
|
||||
RUN { \
|
||||
@@ -65,9 +68,8 @@ 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) \
|
||||
&& mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled \
|
||||
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini) \
|
||||
|| echo "Skipped blackfire as the installation failed" \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -95,5 +97,5 @@ 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/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
+13
-11
@@ -7,13 +7,14 @@ RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions \
|
||||
apcu \
|
||||
bcmath \
|
||||
blackfire \
|
||||
excimer \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
imagick \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
oci8 \
|
||||
opcache \
|
||||
pcntl \
|
||||
@@ -24,26 +25,28 @@ RUN install-php-extensions \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
zip \
|
||||
blackfire \
|
||||
@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 \
|
||||
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync mariadb-client \
|
||||
&& 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
|
||||
&& chmod +x /usr/local/bin/phpunit9 \
|
||||
&& ln -s /usr/local/bin/phpunit9 /usr/local/bin/phpunit
|
||||
|
||||
# Install NVM (Fermium = v14, Gallium = v16)
|
||||
# Install NVM
|
||||
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
|
||||
&& nvm install 14 && nvm install 16 && nvm install 20 \
|
||||
&& nvm alias default 20
|
||||
|
||||
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
|
||||
|
||||
RUN { \
|
||||
@@ -65,9 +68,8 @@ 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) \
|
||||
&& mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled \
|
||||
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini) \
|
||||
|| echo "Skipped blackfire as the installation failed" \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -95,5 +97,5 @@ 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/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
+13
-11
@@ -7,13 +7,14 @@ RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions \
|
||||
apcu \
|
||||
bcmath \
|
||||
blackfire \
|
||||
excimer \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
imagick \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
oci8 \
|
||||
opcache \
|
||||
pcntl \
|
||||
@@ -24,26 +25,28 @@ RUN install-php-extensions \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
zip \
|
||||
blackfire \
|
||||
@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 \
|
||||
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync mariadb-client \
|
||||
&& 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
|
||||
&& chmod +x /usr/local/bin/phpunit9 \
|
||||
&& ln -s /usr/local/bin/phpunit9 /usr/local/bin/phpunit
|
||||
|
||||
# Install NVM (Fermium = v14, Gallium = v16)
|
||||
# Install NVM
|
||||
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
|
||||
&& nvm install 14 && nvm install 16 && nvm install 20 \
|
||||
&& nvm alias default 20
|
||||
|
||||
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
|
||||
|
||||
RUN { \
|
||||
@@ -65,9 +68,8 @@ 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) \
|
||||
&& mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled \
|
||||
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini) \
|
||||
|| echo "Skipped blackfire as the installation failed" \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -95,5 +97,5 @@ 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/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
+13
-11
@@ -7,13 +7,14 @@ RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions \
|
||||
apcu \
|
||||
bcmath \
|
||||
blackfire \
|
||||
excimer \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
imagick \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
oci8 \
|
||||
opcache \
|
||||
pcntl \
|
||||
@@ -24,26 +25,28 @@ RUN install-php-extensions \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
zip \
|
||||
blackfire \
|
||||
@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 \
|
||||
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync mariadb-client \
|
||||
&& 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
|
||||
&& chmod +x /usr/local/bin/phpunit9 \
|
||||
&& ln -s /usr/local/bin/phpunit9 /usr/local/bin/phpunit
|
||||
|
||||
# Install NVM (Fermium = v14, Gallium = v16)
|
||||
# Install NVM
|
||||
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
|
||||
&& nvm install 14 && nvm install 16 && nvm install 20 \
|
||||
&& nvm alias default 20
|
||||
|
||||
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
|
||||
|
||||
RUN { \
|
||||
@@ -65,9 +68,8 @@ 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) \
|
||||
&& mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled \
|
||||
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini) \
|
||||
|| echo "Skipped blackfire as the installation failed" \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -95,5 +97,5 @@ 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/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
+13
-11
@@ -7,13 +7,14 @@ RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions \
|
||||
apcu \
|
||||
bcmath \
|
||||
blackfire \
|
||||
excimer \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
imagick \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
oci8 \
|
||||
opcache \
|
||||
pcntl \
|
||||
@@ -24,26 +25,28 @@ RUN install-php-extensions \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
zip \
|
||||
blackfire \
|
||||
@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 \
|
||||
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync mariadb-client \
|
||||
&& 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
|
||||
&& chmod +x /usr/local/bin/phpunit9 \
|
||||
&& ln -s /usr/local/bin/phpunit9 /usr/local/bin/phpunit
|
||||
|
||||
# Install NVM (Fermium = v14, Gallium = v16)
|
||||
# Install NVM
|
||||
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
|
||||
&& nvm install 14 && nvm install 16 && nvm install 20 \
|
||||
&& nvm alias default 20
|
||||
|
||||
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
|
||||
|
||||
RUN { \
|
||||
@@ -65,9 +68,8 @@ 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) \
|
||||
&& mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled \
|
||||
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini) \
|
||||
|| echo "Skipped blackfire as the installation failed" \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -95,5 +97,5 @@ 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/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
+14
-12
@@ -7,13 +7,14 @@ RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions \
|
||||
apcu \
|
||||
bcmath \
|
||||
blackfire \
|
||||
excimer \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
imagick \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
oci8 \
|
||||
opcache \
|
||||
pcntl \
|
||||
@@ -22,28 +23,30 @@ RUN install-php-extensions \
|
||||
redis \
|
||||
smbclient \
|
||||
sysvsem \
|
||||
xdebug-^3.2 \
|
||||
xdebug \
|
||||
zip \
|
||||
blackfire \
|
||||
@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 \
|
||||
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync mariadb-client \
|
||||
&& 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
|
||||
&& chmod +x /usr/local/bin/phpunit9 \
|
||||
&& ln -s /usr/local/bin/phpunit9 /usr/local/bin/phpunit
|
||||
|
||||
# Install NVM (Fermium = v14, Gallium = v16)
|
||||
# Install NVM
|
||||
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
|
||||
&& nvm install 14 && nvm install 16 && nvm install 20 \
|
||||
&& nvm alias default 20
|
||||
|
||||
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
|
||||
|
||||
RUN { \
|
||||
@@ -65,9 +68,8 @@ 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) \
|
||||
&& mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled \
|
||||
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini) \
|
||||
|| echo "Skipped blackfire as the installation failed" \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -95,5 +97,5 @@ 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/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
+104
-53
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2181
|
||||
|
||||
# set -o xtrace
|
||||
|
||||
DOMAIN_SUFFIX=".$(echo "$VIRTUAL_HOST" | cut -d '.' -f2-)"
|
||||
IS_STANDALONE=$([ -z "$VIRTUAL_HOST" ] && echo "true" )
|
||||
|
||||
@@ -9,11 +11,30 @@ indent() { sed 's/^/ /'; }
|
||||
# Prepare waiting page during auto installation
|
||||
cp /root/installing.html /var/www/html/installing.html
|
||||
|
||||
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
|
||||
|
||||
output() {
|
||||
echo "$@"
|
||||
echo "$@" >> /var/www/html/installing.html
|
||||
}
|
||||
|
||||
fatal() {
|
||||
output "======================================================================================="
|
||||
output "$@"
|
||||
output "======================================================================================="
|
||||
exit 1
|
||||
}
|
||||
|
||||
OCC() {
|
||||
output "occ" "$@"
|
||||
# shellcheck disable=SC2068
|
||||
@@ -25,6 +46,11 @@ update_permission() {
|
||||
chown -R www-data:www-data "$WEBROOT"/data
|
||||
chown www-data:www-data "$WEBROOT"/config
|
||||
chown www-data:www-data "$WEBROOT"/config/config.php 2>/dev/null
|
||||
|
||||
if [ -f /shared/config.php ]
|
||||
then
|
||||
ln -sf /shared/config.php "$WEBROOT"/config/user.config.php
|
||||
fi
|
||||
}
|
||||
|
||||
configure_xdebug_mode() {
|
||||
@@ -39,19 +65,50 @@ configure_xdebug_mode() {
|
||||
|
||||
wait_for_other_containers() {
|
||||
output "⌛ Waiting for other containers"
|
||||
if [ "$SQL" = "mysql" ]
|
||||
then
|
||||
output " - 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
|
||||
retry_with_timeout() {
|
||||
local cmd=$1
|
||||
local timeout=$2
|
||||
local error_message=$3
|
||||
local START_TIME=$SECONDS
|
||||
|
||||
while ! bash -c "$cmd"; do
|
||||
if [ "$((SECONDS - START_TIME))" -ge "$timeout" ]; then
|
||||
fatal "$error_message"
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
}
|
||||
|
||||
case "$SQL" in
|
||||
"mysql" | "mariadb-replica")
|
||||
output " - MySQL"
|
||||
retry_with_timeout "(echo > /dev/tcp/database-$SQL/3306) 2>/dev/null" 30 "⚠ Unable to connect to the MySQL server"
|
||||
sleep 2
|
||||
;;
|
||||
"pgsql")
|
||||
retry_with_timeout "(echo > /dev/tcp/database-pgsql/5432) 2>/dev/null" 30 "⚠ Unable to connect to the PostgreSQL server"
|
||||
sleep 2
|
||||
;;
|
||||
"maxscale")
|
||||
for node in database-mariadb-primary database-mariadb-replica; do
|
||||
echo " - Waiting for $node"
|
||||
retry_with_timeout "(echo > /dev/tcp/$node/3306) 2>/dev/null" 30 "⚠ Unable to reach to the $node"
|
||||
retry_with_timeout "mysql -u root -pnextcloud -h $node -e 'SELECT 1' 2>/dev/null" 30 "⚠ Unable to connect to the $node"
|
||||
echo "✅"
|
||||
done
|
||||
;;
|
||||
"oci")
|
||||
output " - Oracle"
|
||||
retry_with_timeout "(echo > /dev/tcp/database-$SQL/1521) 2>/dev/null" 30 "⚠ Unable to connect to the Oracle server"
|
||||
sleep 2
|
||||
;;
|
||||
"sqlite")
|
||||
output " - SQLite"
|
||||
;;
|
||||
*)
|
||||
fatal 'Not implemented'
|
||||
;;
|
||||
esac
|
||||
[ $? -eq 0 ] && output "✅ Database server ready"
|
||||
}
|
||||
|
||||
@@ -166,36 +223,9 @@ configure_add_user() {
|
||||
|
||||
install() {
|
||||
DBNAME=$(echo "$VIRTUAL_HOST" | cut -d '.' -f1)
|
||||
SQLHOST="database-$SQL"
|
||||
echo "database name will be $DBNAME"
|
||||
|
||||
if [ "$SQL" = "mysql" ]
|
||||
then
|
||||
cp /root/autoconfig_mysql.php "$WEBROOT"/config/autoconfig.php
|
||||
sed -i "s/dbname' => 'nextcloud'/dbname' => '$DBNAME'/" "$WEBROOT/config/autoconfig.php"
|
||||
SQLHOST=database-mysql
|
||||
fi
|
||||
|
||||
if [ "$SQL" = "pgsql" ]
|
||||
then
|
||||
cp /root/autoconfig_pgsql.php "$WEBROOT"/config/autoconfig.php
|
||||
sed -i "s/dbname' => 'nextcloud'/dbname' => '$DBNAME'/" "$WEBROOT/config/autoconfig.php"
|
||||
SQLHOST=database-postgres
|
||||
fi
|
||||
|
||||
if [ "$SQL" = "oci" ]
|
||||
then
|
||||
cp /root/autoconfig_oci.php "$WEBROOT"/config/autoconfig.php
|
||||
fi
|
||||
|
||||
# We copy the default config to the container
|
||||
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"
|
||||
|
||||
@@ -203,11 +233,19 @@ install() {
|
||||
|
||||
output "🔧 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=nextcloud --database-host="$SQLHOST" --database-port=1521 --database-user=nextcloud --database-pass=nextcloud
|
||||
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
|
||||
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
|
||||
elif [ "$SQL" = "mariadb-replica" ]; then
|
||||
OCC maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database="mysql" --database-name="$DBNAME" --database-host="database-mariadb-primary" --database-user=root --database-pass=nextcloud
|
||||
elif [ "$SQL" = "maxscale" ]; then
|
||||
sleep 10
|
||||
# FIXME only works for main container as maxscale does not pass root along
|
||||
OCC maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database="mysql" --database-name="$DBNAME" --database-host="database-mariadb-primary" --database-user=nextcloud --database-pass=nextcloud
|
||||
OCC config:system:set dbhost --value="database-maxscale"
|
||||
OCC config:system:set dbuser --value="nextcloud"
|
||||
else
|
||||
OCC maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database="$SQL"
|
||||
fi;
|
||||
@@ -263,6 +301,8 @@ install() {
|
||||
|
||||
output "🔧 Preparing cron job"
|
||||
|
||||
OCC dav:sync-system-addressbook
|
||||
|
||||
# Setup initial configuration
|
||||
OCC background:cron
|
||||
|
||||
@@ -324,10 +364,21 @@ setup() {
|
||||
# configuration that should be applied on each start
|
||||
configure_ssl_proxy
|
||||
else
|
||||
# We copy the default config to the container
|
||||
cp /root/default.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
|
||||
|
||||
if [ "$NEXTCLOUD_AUTOINSTALL" != "NO" ]
|
||||
then
|
||||
add_hosts
|
||||
install
|
||||
else
|
||||
touch "${WEBROOT}/config/CAN_INSTALL"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -336,6 +387,17 @@ check_source() {
|
||||
if [ -f "$FILE" ]; then
|
||||
output "Server source is mounted, continuing"
|
||||
else
|
||||
# Only autoinstall when not running in docker compose
|
||||
if [ -n "$VIRTUAL_HOST" ] && [ ! -f "$WEBROOT"/version.php ]
|
||||
then
|
||||
output "======================================================================================="
|
||||
output " 🚨 Could not find a valid Nextcloud source in $WEBROOT "
|
||||
output " Double check your REPO_PATH_SERVER and STABLE_ROOT_PATH environment variables in .env "
|
||||
output "======================================================================================="
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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)
|
||||
@@ -352,17 +414,6 @@ check_source() {
|
||||
output "Nextcloud server source is ready"
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM --platform=linux/amd64 ubuntu:22.04
|
||||
FROM --platform=linux/amd64 ubuntu:24.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 \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
$AUTOCONFIG = [
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => 'database-postgres',
|
||||
'dbhost' => 'database-pgsql',
|
||||
'dbuser' => 'postgres',
|
||||
'dbpass' => 'postgres',
|
||||
'dbtype' => 'pgsql'
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
<?php $CONFIG=[
|
||||
'debug' => true,
|
||||
'profiler' => true,
|
||||
'apps_paths' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'path' => '/var/www/html/apps',
|
||||
'url' => '/apps',
|
||||
'writable' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'path' => '/var/www/html/apps-extra',
|
||||
'url' => '/apps-extra',
|
||||
'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',
|
||||
'writable' => true,
|
||||
),
|
||||
),
|
||||
|
||||
// allow local remote senders
|
||||
'allow_local_remote_servers' => true,
|
||||
|
||||
// config for mailhog
|
||||
'mail_from_address' => 'admin',
|
||||
'mail_smtpmode' => 'smtp',
|
||||
'mail_sendmailmode' => 'smtp',
|
||||
'mail_domain' => 'localhost',
|
||||
'mail_smtphost' => 'mail',
|
||||
'mail_smtpport' => '1025',
|
||||
|
||||
'skeletondirectory' => '/skeleton',
|
||||
|
||||
'setup_create_db_user' => false,
|
||||
|
||||
//PLACEHOLDER
|
||||
];
|
||||
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
$hostname = gethostname();
|
||||
$primary = isset($_ENV['PRIMARY']) ? $_ENV['PRIMARY'] : '';
|
||||
$virtualHost = isset($_ENV['VIRTUAL_HOST']) ? $_ENV['VIRTUAL_HOST'] : '';
|
||||
$virtualHost = explode(".", $virtualHost);
|
||||
if (count($virtualHost) > 0) {
|
||||
$hostname = array_shift($virtualHost);
|
||||
}
|
||||
|
||||
$CONFIG=[
|
||||
'debug' => true,
|
||||
'profiler' => true,
|
||||
'apps_paths' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'path' => '/var/www/html/apps',
|
||||
'url' => '/apps',
|
||||
'writable' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'path' => '/var/www/html/apps-extra',
|
||||
'url' => '/apps-extra',
|
||||
'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',
|
||||
'writable' => true,
|
||||
),
|
||||
),
|
||||
|
||||
// allow local remote senders
|
||||
'allow_local_remote_servers' => true,
|
||||
|
||||
// config for mailhog
|
||||
'mail_from_address' => 'admin',
|
||||
'mail_smtpmode' => 'smtp',
|
||||
'mail_sendmailmode' => 'smtp',
|
||||
'mail_domain' => 'localhost',
|
||||
'mail_smtphost' => 'mail',
|
||||
'mail_smtpport' => '1025',
|
||||
|
||||
'skeletondirectory' => '/skeleton',
|
||||
|
||||
'setup_create_db_user' => false,
|
||||
|
||||
'debug' => true,
|
||||
'loglevel' => 2,
|
||||
|
||||
// 'htaccess.RewriteBase' => '/',
|
||||
'log_query' => false,
|
||||
'query_log_file' => '/shared/log/querylog-' . $hostname .'.log',
|
||||
'query_log_file_requestid' => 'yes',
|
||||
|
||||
'diagnostics.logging' => false,
|
||||
'diagnostics.logging.threshold' => 0,
|
||||
'log.condition' => [
|
||||
'apps' => ['diagnostics', 'admin_audit'],
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
if ($primary === 'minio') {
|
||||
$CONFIG += [
|
||||
'objectstore' =>
|
||||
array (
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' =>
|
||||
array (
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'minio',
|
||||
'port' => '9000',
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
'autocreate' => true,
|
||||
'verify_bucket_exists' => true,
|
||||
),
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
if ($primary === 'minio-multibucket') {
|
||||
$CONFIG += [
|
||||
'objectstore_multibucket' => array(
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array(
|
||||
// optional, defaults to 64
|
||||
'num_buckets' => 64,
|
||||
// n integer in the range from 0 to (num_buckets-1) will be appended
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'minio',
|
||||
'port' => '9000',
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
),
|
||||
),
|
||||
];
|
||||
}
|
||||
@@ -10,3 +10,6 @@ opcache.revalidate_freq=1
|
||||
|
||||
apc.enable_cli=1
|
||||
memory_limit=512M
|
||||
|
||||
upload_max_filesize=512M
|
||||
post_max_size=512M
|
||||
|
||||
@@ -3,7 +3,7 @@ xdebug.mode = off
|
||||
xdebug.idekey=PHPSTORM
|
||||
xdebug.trace_output_name=trace.%R.%u
|
||||
xdebug.profiler_output_name=profile.%R.%u
|
||||
xdebug.output_dir=/shared
|
||||
xdebug.output_dir=/shared/xdebug
|
||||
|
||||
xdebug.log = /var/log/xdebug.log
|
||||
xdebug.log_level = 1
|
||||
@@ -15,4 +15,8 @@ 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 xdebug.mode trace to use this
|
||||
; More details at https://derickrethans.nl/flamboyant-flamegraphs.html
|
||||
xdebug.trace_format=3
|
||||
xdebug.trace_output_name=xdebug.%R.%u
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// FIXME: Move everything except the last part to the containers
|
||||
// set the hostname to the VIRTUAL_HOST set for the docker container, otherwise fallback to the docker hostname
|
||||
$hostname = gethostname();
|
||||
$primary = isset($_ENV['PRIMARY']) ? $_ENV['PRIMARY'] : '';
|
||||
$virtualHost = isset($_ENV['VIRTUAL_HOST']) ? $_ENV['VIRTUAL_HOST'] : '';
|
||||
$virtualHost = explode(".", $virtualHost);
|
||||
if (count($virtualHost) > 0) {
|
||||
$hostname = array_shift($virtualHost);
|
||||
}
|
||||
|
||||
$CONFIG = [];
|
||||
if ($primary === 'minio') {
|
||||
$CONFIG += [
|
||||
'objectstore' =>
|
||||
array (
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' =>
|
||||
array (
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'minio',
|
||||
'port' => '9000',
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
'autocreate' => true,
|
||||
'verify_bucket_exists' => true,
|
||||
),
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
if ($primary === 'minio-multibucket') {
|
||||
$CONFIG += [
|
||||
'objectstore_multibucket' => array(
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array(
|
||||
// optional, defaults to 64
|
||||
'num_buckets' => 64,
|
||||
// n integer in the range from 0 to (num_buckets-1) will be appended
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'minio',
|
||||
'port' => '9000',
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
),
|
||||
),
|
||||
];
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM elasticsearch:7.17.14
|
||||
FROM elasticsearch:7.17.22
|
||||
|
||||
RUN bin/elasticsearch-plugin install --batch ingest-attachment
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:22.04
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV DBPASSWD=abrakadabra
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
[primary]
|
||||
type=server
|
||||
address=database-mariadb-primary
|
||||
port=3306
|
||||
protocol=MariaDBBackend
|
||||
|
||||
[replica1]
|
||||
type=server
|
||||
address=database-mariadb-replica
|
||||
port=3306
|
||||
protocol=MariaDBBackend
|
||||
|
||||
[MariaDB-Monitor]
|
||||
type=monitor
|
||||
module=mariadbmon
|
||||
servers=primary,replica1
|
||||
user=root
|
||||
password=nextcloud
|
||||
|
||||
[RW-Split-Router]
|
||||
type=service
|
||||
router=readwritesplit
|
||||
servers=primary,replica1
|
||||
user=root
|
||||
password=nextcloud
|
||||
|
||||
[RW-Split-Listener]
|
||||
type=listener
|
||||
service=RW-Split-Router
|
||||
protocol=MariaDBClient
|
||||
port=3306
|
||||
+14
-12
@@ -7,13 +7,14 @@ RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions \
|
||||
apcu \
|
||||
bcmath \
|
||||
blackfire \
|
||||
excimer \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
imagick \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
oci8 \
|
||||
opcache \
|
||||
pcntl \
|
||||
@@ -22,28 +23,30 @@ RUN install-php-extensions \
|
||||
redis \
|
||||
smbclient \
|
||||
sysvsem \
|
||||
xdebug-^3.2 \
|
||||
xdebug \
|
||||
zip \
|
||||
blackfire \
|
||||
@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 \
|
||||
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync mariadb-client \
|
||||
&& 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
|
||||
&& chmod +x /usr/local/bin/phpunit9 \
|
||||
&& ln -s /usr/local/bin/phpunit9 /usr/local/bin/phpunit
|
||||
|
||||
# Install NVM (Fermium = v14, Gallium = v16)
|
||||
# Install NVM
|
||||
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
|
||||
&& nvm install 14 && nvm install 16 && nvm install 20 \
|
||||
&& nvm alias default 20
|
||||
|
||||
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
|
||||
|
||||
RUN { \
|
||||
@@ -65,9 +68,8 @@ 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) \
|
||||
&& mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled \
|
||||
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini) \
|
||||
|| echo "Skipped blackfire as the installation failed" \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -95,5 +97,5 @@ 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/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
+14
-12
@@ -7,7 +7,7 @@ RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions \
|
||||
apcu \
|
||||
bcmath \
|
||||
blackfire \
|
||||
excimer \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
@@ -15,6 +15,7 @@ RUN install-php-extensions \
|
||||
# imagick \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
oci8 \
|
||||
opcache \
|
||||
pcntl \
|
||||
@@ -23,28 +24,30 @@ RUN install-php-extensions \
|
||||
redis \
|
||||
smbclient \
|
||||
sysvsem \
|
||||
# xdebug \
|
||||
xdebug \
|
||||
zip \
|
||||
blackfire \
|
||||
@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 \
|
||||
git curl vim sudo cron smbclient iproute2 lnav wget iputils-ping gnupg2 jq ripgrep rsync mariadb-client \
|
||||
&& 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
|
||||
&& chmod +x /usr/local/bin/phpunit9 \
|
||||
&& ln -s /usr/local/bin/phpunit9 /usr/local/bin/phpunit
|
||||
|
||||
# Install NVM (Fermium = v14, Gallium = v16)
|
||||
# Install NVM
|
||||
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
|
||||
&& nvm install 14 && nvm install 16 && nvm install 20 \
|
||||
&& nvm alias default 20
|
||||
|
||||
RUN wget https://gist.githubusercontent.com/nickvergessen/e21ee0a09ee3b3f7fd1b04c83dd3e114/raw/83142be1e50c23e8de1bd7aae88a95e5d6ae1ce2/nextcloud_log.json && lnav -i nextcloud_log.json && rm nextcloud_log.json
|
||||
|
||||
RUN { \
|
||||
@@ -66,9 +69,8 @@ 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) \
|
||||
&& mv /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini /usr/local/etc/php/conf.d/docker-php-ext-blackfire.ini.disabled \
|
||||
&& printf "\n\nblackfire.agent_socket=tcp://blackfire:8307\n" >> $PHP_INI_DIR/conf.d/zz-blackfire.ini) \
|
||||
|| echo "Skipped blackfire as the installation failed" \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -96,5 +98,5 @@ 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/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
# Getting started
|
||||
|
||||
## Tutorial
|
||||
|
||||
You can find a [step-by-step tutorial on how to use this setup](https://cloud.nextcloud.com/s/iyNGp8ryWxc7Efa?path=%2F1%20Setting%20up%20a%20development%20environment) in the [Nextcloud Developer Portal](https://nextcloud.com/developer/). It will guide you through the setup and show you how to use it for app development.
|
||||
|
||||
There are two ways of using this setup. **A persistent setup is the most common one** where you have a local git clone of all required repositories. The other one is a standalone setup that can be used to quickly run parts of the Nextcloud ecosystem source code without having to clone everything.
|
||||
|
||||
## Persistent development setup
|
||||
|
||||
!!! note
|
||||
This is the recommended way to run the setup for development. You will have a local clone of all required source code.
|
||||
|
||||
To start the setup run the following commands to clone the repository and bootstrap the setup. This will prepare your setup and clone the Nextcloud server repository and required apps into the `workspace` folder.
|
||||
```bash
|
||||
git clone https://github.com/juliushaertl/nextcloud-docker-dev
|
||||
cd nextcloud-docker-dev
|
||||
./bootstrap.sh
|
||||
```
|
||||
|
||||
This may take some time depending on your internet connection speed.
|
||||
|
||||
Depending on your docker version you will need to use `docker-compose` instead of `docker compose` in the following commands.
|
||||
|
||||
Once done you can start the Nextcloud container using:
|
||||
```bash
|
||||
docker compose up nextcloud
|
||||
```
|
||||
|
||||
You can also start it in the background using `docker compose up -d nextcloud`.
|
||||
|
||||
You can then access your Nextcloud instance at [http://nextcloud.local](http://nextcloud.local). The default username is `admin` and the password is `admin`. [Other users can be found in the documentation](https://juliushaertl.github.io/nextcloud-docker-dev/basics/overview/#default-users).
|
||||
|
||||
!!! warning
|
||||
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
|
||||
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
|
||||
git fetch origin
|
||||
```
|
||||
|
||||
|
||||
## Standalone containers
|
||||
|
||||
!!! note
|
||||
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:
|
||||
|
||||
```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 specifying 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
|
||||
```
|
||||
@@ -0,0 +1,44 @@
|
||||
# Hostnames
|
||||
|
||||
## Using /etc/hosts
|
||||
|
||||
In order to use the hostnames provided by the environment you need to add them to the /etc/hosts file (which is the simplest method).
|
||||
|
||||
You can do this by running the following command, which will automatically update entries:
|
||||
|
||||
```bash
|
||||
./scripts/update-hosts.sh
|
||||
```
|
||||
|
||||
## 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.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Overview
|
||||
|
||||
## Nextcloud containers
|
||||
|
||||
There are multiple containers that can be started for Nextcloud. The main `nextcloud` container is targeting the main workspace directly (usually for running the master/main branch of Nextcloud server and apps) of the latest development version. In addition, there are stable containers for running the stable major version branches in parallel.
|
||||
|
||||
Additional services like databases, redis cache, minio object storage and others are provided as separate containers and are shared between the different Nextcloud containers. They still isolate data of the individual Nextcloud containers from each other.
|
||||
|
||||
For any HTTP services a nginx proxy container is used to route requests to the correct container. This proxy is automatically started.
|
||||
|
||||
## Default users
|
||||
|
||||
The following user accounts are available by default:
|
||||
|
||||
- `admin` / `admin`
|
||||
- `alice` / `alice`
|
||||
- `bob` / `bob`
|
||||
- `user1` / `user1`
|
||||
- `user2` / `user2`
|
||||
- `user3` / `user3`
|
||||
- `user4` / `user4`
|
||||
|
||||
## App directories
|
||||
|
||||
The Nextcloud containers are configured to use multiple app directories.
|
||||
|
||||
- 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
|
||||
|
||||
## Cronjobs
|
||||
|
||||
The cronjobs are configured to run every 5 minutes in the individual containers.
|
||||
|
||||
For testing, you can also run them manually:
|
||||
|
||||
```bash
|
||||
docker compose exec nextcloud php cron.php
|
||||
```
|
||||
|
||||
### occ
|
||||
|
||||
Run inside the Nextcloud container:
|
||||
|
||||
```
|
||||
set XDEBUG_CONFIG=idekey=PHPSTORM
|
||||
sudo -E -u www-data php -dxdebug.remote_host=192.168.21.1 occ
|
||||
```
|
||||
@@ -0,0 +1,23 @@
|
||||
# HTTPS
|
||||
|
||||
A nginx proxy container is used to route requests to the correct container. This proxy is automatically started. It can be configured to use HTTPS by setting the `PROTOCOL` environment variable to `https` in the `.env` file. The container will pick up SSL certificates automatically from `data/ssl/` named by the domain name.
|
||||
|
||||
# Use mkcert
|
||||
|
||||
mkcert is a simple tool for making locally-trusted development certificates. It requires no configuration. This would be the recommended way to generate certificates for local development.
|
||||
|
||||
* Install [mkcert](https://github.com/FiloSottile/mkcert)
|
||||
* Go to `data/ssl`
|
||||
* `mkcert -cert-file nextcloud.local.crt -key-file nextcloud.local.key nextcloud.local`
|
||||
* Add `PROTOCOL=https` to your `.env` file
|
||||
* `docker compose restart proxy`
|
||||
* There is also a script to generate/update all certs: `./scripts/update-certs`
|
||||
|
||||
## Use self-signed certificates
|
||||
|
||||
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
|
||||
```
|
||||
@@ -0,0 +1,64 @@
|
||||
# Stable Nextcloud versions
|
||||
|
||||
As described in the [overview](overview.md) there are multiple Nextcloud containers available. The main `nextcloud` container is targeting the main workspace directly (usually for running the master/main branch of Nextcloud server and apps) of the latest development version. In addition, there are stable containers for running the stable major version branches in parallel.
|
||||
|
||||
## Prepare your git checkouts for running a stable version
|
||||
|
||||
In order to run a stable version you need to have the corresponding git checkouts available. 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 and is the recommended way to work with stable branches in parallel.
|
||||
|
||||
Assuming you have already cloned the repository into `~/nextcloud-docker-dev/workspace/server` you can run the following commands to create a new worktree for the stable28 branch:
|
||||
|
||||
```bash
|
||||
# create a new worktree for the stable28 branch
|
||||
cd ~/nextcloud-docker-dev/workspace/server
|
||||
git worktree add ../stable28 stable28
|
||||
cd ~/nextcloud-docker-dev/workspace/stable28
|
||||
# make sure submodules are installed in the stable server root directory
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
### Add worktree for additional apps
|
||||
|
||||
This will be required for every app that you need on the stable branches, so run this for viewer but also for any other app you need.
|
||||
|
||||
```bash
|
||||
cd ~/nextcloud-docker-dev/workspace/server/apps/viewer
|
||||
git worktree add ../../../stable28/apps/viewer stable28
|
||||
```
|
||||
|
||||
## Start the stable28 container
|
||||
|
||||
```bash
|
||||
docker compose up -d stable28
|
||||
```
|
||||
You can now access the stable Nextcloud instance at [http://stable28.local](http://stable28.local).
|
||||
|
||||
## Apps without stable branches
|
||||
|
||||
Some apps do not have stable branches or cover multiple Nextcloud version.
|
||||
You can clone the apps you need in the stable versions to the path set in `ADDITIONAL_APPS_PATH`.
|
||||
By default, this path set to `./data/apps-extra` and then mounted to `/var/www/html/apps-shared` in `docker-compose.yml`:
|
||||
|
||||
```
|
||||
'${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-shared'
|
||||
```
|
||||
|
||||
You can change the default value in the `.env` file:
|
||||
|
||||
```
|
||||
ADDITIONAL_APPS_PATH=/path-to-your-app/
|
||||
```
|
||||
|
||||
#### 🤓 How to check if the ADDITIONAL_APPS_PATH mounting worked as expected
|
||||
1. Check if your app is listed at [http://stable28.local/index.php/settings/apps/disabled](http://stable28.local/index.php/settings/apps/disabled)
|
||||
2. Alternatively, login into the container created from the image `nextcloud-dev-php<PHP version>` and run `occ app:list`:
|
||||
```bash
|
||||
docker exec -it <container name or ID> /bin/bash
|
||||
occ app:list
|
||||
```
|
||||
Your app should be listed under the `Disabled` list.
|
||||
|
||||
- https://docs.docker.com/engine/reference/commandline/container_exec/
|
||||
- https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#apps-commands-label
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Standalone containers
|
||||
|
||||
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:
|
||||
|
||||
```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 specifying 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
|
||||
```
|
||||
@@ -0,0 +1,13 @@
|
||||
# Troubleshooting
|
||||
|
||||
- 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.
|
||||
- You can run `./bootstrap.sh` again to check the setup and detected paths for your source code destination
|
||||
- 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.
|
||||
|
||||
## Logs
|
||||
|
||||
- You can use `docker compose logs -f` to follow the logs of all containers
|
||||
- You can use `docker compose logs -f nextcloud` to follow the logs of the Nextcloud container
|
||||
@@ -0,0 +1,35 @@
|
||||
# Update
|
||||
|
||||
## Updating the development environment
|
||||
|
||||
- `git pull` to get the latest changes
|
||||
- Update the container images through either
|
||||
- `make pull-installed` to pull the latest versions of all images that are already downloaded
|
||||
- `make pull-all` to pull the latest versions of all images
|
||||
- After pulling make sure to either recreate the containers manually or recreate the full development environment through `docker compose down -v` and `docker compose up -d nextcloud` for the containers in use.
|
||||
|
||||
## Updating the Nextcloud server
|
||||
|
||||
As Nextcloud containers are bound to a server major version and the code is updated through manual git pull.
|
||||
|
||||
It is recommended to stay up to date with the latest development version of the Nextcloud server:
|
||||
|
||||
```bash
|
||||
cd workspace/server
|
||||
git pull
|
||||
git submodule update
|
||||
```
|
||||
|
||||
For other apps checked out you might want to run a separate `git pull` in the respective directories.
|
||||
|
||||
If nextcloud requires migration steps it will ask you to run an upgrade which can be done with the following command:
|
||||
|
||||
```bash
|
||||
docker compose exec nextcloud occ upgrade
|
||||
```
|
||||
|
||||
### Major version bump
|
||||
|
||||
In case Nextcloud server bumps the major version, you will need to pull all repositories again to the latest state to get the compatibility changes.
|
||||
|
||||
You might want to take the opportunity to then set up the previous version as a new stable version setup. See [stable versions](stable-versions.md) for more information.
|
||||
@@ -0,0 +1,13 @@
|
||||
# Build containers
|
||||
|
||||
This is usually only required if you want to test changes to the containers or if you want to build the containers yourself instead of using the prebuilt images.
|
||||
|
||||
You can build the containers manually for testing local changes by calling make with the Dockerfile as the target:
|
||||
|
||||
```bash
|
||||
make docker/php82/Dockerfile
|
||||
make docker/Dockerfile.php81
|
||||
make docker/Dockerfile.php80
|
||||
```
|
||||
|
||||
Afterward you can recreate the container with `docker compose up -d --force-recreate nextcloud` to run the new image or use `docker compose down -v` before to also reinstall Nextcloud.
|
||||
@@ -0,0 +1,36 @@
|
||||
# Config
|
||||
|
||||
## PHP Version
|
||||
|
||||
The PHP version can be changed by setting the `PHP_VERSION` environment variable in your local `.env` file. If no value is set the minimum required version for the current Nextcloud version will be used depending on the Nextcloud container.
|
||||
|
||||
```bash
|
||||
# For using PHP 8.3
|
||||
PHP_VERSION=83
|
||||
```
|
||||
|
||||
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`
|
||||
- PHP 8.2: `82`
|
||||
- PHP 8.3: `83` (currently the xdebug and imagick php extensions are not available for this version)
|
||||
|
||||
## Nextcloud config.php
|
||||
|
||||
The config.php file of Nextcloud is pre-seeded with lots of configuration values. In order to change them you can place a personal config.php file in `data/shared/config.php`. This file will be included after the default config.php file for all Nextcloud containers.
|
||||
|
||||
```php
|
||||
<?php
|
||||
$CONFIG = [
|
||||
'loglevel' => 2,
|
||||
'log_query' => true,
|
||||
'log.condition' => [
|
||||
'apps' => ['myapp'],
|
||||
],
|
||||
];
|
||||
```
|
||||
@@ -0,0 +1,29 @@
|
||||
# Setup hooks
|
||||
|
||||
In order to customize the behavior of the application, you can use hooks. Hooks need to be placed in the `data/shared/hooks/` directory. They will be picked up by the docker containers automatically. They can be used for automating setup specific to a developers use cases. For example, you can use them to create a user, install an app, or run a script before or after the installation of Nextcloud.
|
||||
|
||||
The following hooks are currently available:
|
||||
|
||||
- before-install.sh Runs before the installation of Nextcloud
|
||||
- after-install.sh Runs after the installation of Nextcloud
|
||||
- before-start.sh Runs before the start of Nextcloud webserver
|
||||
- after-start.sh Runs after the start of Nextcloud webserver
|
||||
|
||||
## Example for after-install.sh
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
echo 'Create some users'
|
||||
export OC_PASS=mycustomuser
|
||||
occ user:add --password-from-env mycustomuser
|
||||
```
|
||||
|
||||
## Example for before-start.sh
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
echo 'Always disable the firstrunwizard'
|
||||
occ app:disable firstrunwizard
|
||||
```
|
||||
@@ -0,0 +1,15 @@
|
||||
# Tips
|
||||
|
||||
## Shell aliases
|
||||
|
||||
It can be useful to be able to access your setup quickly through your shell. Here are some examples that you could add to your bashrc or zshrc:
|
||||
|
||||
## nc-dev
|
||||
|
||||
The following shell function allows you to run `nc-dev` instead of `docker compose` in any location. This way you can run for example `nc-dev up -d nextcloud`, `nc-dev exec nextcloud bash` or `nc-dev exec nextcloud occ`.
|
||||
|
||||
````
|
||||
nc-dev() {
|
||||
(cd ~/path/to/nextcloud-docker-dev && docker compose $@)
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
This documentation covers a Nextcloud development environment using docker compose providing a large variety of services for Nextcloud server and app development and testing.
|
||||
|
||||
⚠ **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
|
||||
|
||||
- ☁ Nextcloud containers for running multiple versions
|
||||
- 🐘 Multiple PHP versions
|
||||
- 🔒 Nginx proxy with optional SSL termination
|
||||
- 🛢️ MySQL/PostgreSQL/MariaDB/SQLite/MaxScale, Redis cache
|
||||
- 💾 Local or S3 primary storage
|
||||
- 👥 LDAP with example user data, Keycloak
|
||||
- ✉ Mailhog for testing mail sending
|
||||
- 🚀 Blackfire, Xdebug for profiling and debugging
|
||||
- 📄 Lots of integrating service containers: Collabora Online, Onlyoffice, Elasticsearch, ...
|
||||
|
||||
Follow the [getting started guide](https://juliushaertl.github.io/nextcloud-docker-dev/basics/getting-started/) or the [Nextcloud developer tutorial](https://nextcloud.com/developer/) to get started.
|
||||
@@ -0,0 +1,8 @@
|
||||
# Antivirus
|
||||
|
||||
```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`.
|
||||
@@ -0,0 +1,74 @@
|
||||
# Database
|
||||
|
||||
## Introduction
|
||||
|
||||
By default, MySQL will be used as database backend. You can change this by setting the `SQL` variable in the `.env` file. The following databases are supported:
|
||||
|
||||
- `mysql`
|
||||
- `pgsql`
|
||||
- `sqlite`
|
||||
- `mariadb-replica`
|
||||
- `maxscale`
|
||||
|
||||
Changing the database env value will require to recreate your setup. You can do this by running `docker compose down -v` and then `docker compose up -d nextcloud`.
|
||||
|
||||
All databases use the following credentials by default:
|
||||
|
||||
- Root password: `nextcloud`
|
||||
- Username: `nextcloud`
|
||||
- Password: `nextcloud`
|
||||
- Database: `nextcloud` or the name of the stable container e.g. `stable27``
|
||||
|
||||
## Accessing the database
|
||||
|
||||
### MySQL/MariaDB
|
||||
|
||||
You can access the database with the following command:
|
||||
|
||||
```bash
|
||||
docker compose exec mariadb mysql -u root -pnextcloud
|
||||
```
|
||||
|
||||
If you prefer a GUI frontend you can additionally launch the phpmyadmin container with `docker compose up -d phpmyadmin` and access it via <http://phpmyadmin.local>.
|
||||
|
||||
Alternatively you can use a database client to access the database from the host system. The port can be obtained with `docker compose port database-mysql 3306`. The host is `localhost` and the credentials are the same as above.
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
You can access the database with the following command:
|
||||
|
||||
```bash
|
||||
docker compose exec postgres psql -U nextcloud -d nextcloud
|
||||
```
|
||||
|
||||
If you prefer a GUI frontend you can additionally launch the pgadmin container with `docker compose up -d pgadmin` and access it via <http://pgadmin.local>.
|
||||
|
||||
Alternatively you can use a database client to access the database from the host system. The port can be obtained with `docker compose port database-pgsql 5432`. The host is `localhost` and the credentials are the same as above.
|
||||
|
||||
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`
|
||||
|
||||
### SQLite
|
||||
|
||||
You can access the database with the following command:
|
||||
|
||||
```bash
|
||||
docker compose exec nextcloud sqlite3 /var/www/html/data/nextcloud.db
|
||||
```
|
||||
|
||||
### MariaDB Replica
|
||||
|
||||
This mode runs a mariadb primary and read replica setup. The primary is used for writes and the replica for reads. This is useful for larger setups where you want to scale the database.
|
||||
|
||||
You can access the database with the following command:
|
||||
|
||||
```bash
|
||||
docker compose exec database-mariadb-primary mysql -u root -pnextcloud
|
||||
docker compose exec database-mariadb-replica mysql -u root -pnextcloud
|
||||
```
|
||||
|
||||
### MaxScale
|
||||
|
||||
This mode runs a mariadb primary and read replica setup with maxscale as load balancer. The primary is used for writes and the replica for reads where MaxScale is used to perform a read-write-split.
|
||||
|
||||
The logs of MaxScale can be accessed with `docker compose exec maxscale cat /var/log/maxscale/maxscale.log`.
|
||||
@@ -0,0 +1,8 @@
|
||||
# Imaginary
|
||||
|
||||
Enable the imaginary server for generating previews
|
||||
|
||||
```bash
|
||||
docker compose up proxy nextcloud previews_hpb
|
||||
./scripts/enable-preview-imaginary.sh
|
||||
```
|
||||
@@ -0,0 +1,11 @@
|
||||
# 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
|
||||
|
||||
- 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>`
|
||||
- `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*))"`
|
||||
@@ -0,0 +1,3 @@
|
||||
# Mail
|
||||
|
||||
Sending mails from Nextcloud usually requires an email server and account to be configured. This setup provides a [mailhog](https://github.com/mailhog/MailHog) installation that is autoconfigured, so you can browse all mails sent from Nextcloud in the webui by opening [mail.local](http://mail.local) in your browser.
|
||||
@@ -0,0 +1,19 @@
|
||||
## Global scale
|
||||
|
||||
```
|
||||
docker compose up -d proxy portal gs1 gs2 lookup database-mysql
|
||||
```
|
||||
|
||||
Users are named the same as the instance name, e.g. `gs1`, `gs2`
|
||||
|
||||
## [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`
|
||||
@@ -0,0 +1,29 @@
|
||||
# Nextcloud Office / Collabora Online
|
||||
|
||||
Nextcloud Office is a self-hosted and online office suite that can be used with Nextcloud based on Collabora Online.
|
||||
|
||||
## Automatic setup
|
||||
|
||||
A script is available to automatically setup Collabora Online for you combined with an already running Nextcloud container.
|
||||
|
||||
It requires to have the [richdocuments](https://github.com/nextcloud/richdocuments) app cloned into your apps directory.
|
||||
|
||||
```bash
|
||||
./scripts/enable-collabora <container-name>
|
||||
```
|
||||
|
||||
## Manual steps
|
||||
|
||||
- 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
|
||||
- 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
|
||||
|
||||
## Using with HTTPS
|
||||
|
||||
To properly work with HTTPS, you need to add the following parameter to the Collabora container in the `.env`file:
|
||||
|
||||
```
|
||||
COLLABORA_PARAMS="--o:ssl.termination=true"
|
||||
```
|
||||
@@ -0,0 +1,28 @@
|
||||
# ONLYOFFICE
|
||||
|
||||
ONLYOFFICE is a self-hosted office suite that can be used with Nextcloud.
|
||||
|
||||
## Automatic setup
|
||||
|
||||
Make sure to clone <https://github.com/ONLYOFFICE/onlyoffice-nextcloud> into your apps directory:
|
||||
|
||||
```bash
|
||||
cd ~/nextcloud-docker-dev/workspace/server/apps-extra
|
||||
git clone https://github.com/ONLYOFFICE/onlyoffice-nextcloud onlyoffice
|
||||
```
|
||||
|
||||
|
||||
A script is available to automatically setup ONLYOFFICE for you combined with an already running Nextcloud container.
|
||||
|
||||
It requires to have the onlyoffice integration app cloned into your apps directory.
|
||||
|
||||
```bash
|
||||
./scripts/enable-onlyoffice <container-name>
|
||||
```
|
||||
|
||||
## Manual steps
|
||||
|
||||
- Make sure to have the ONLYOFFICE hostname setup in your `/etc/hosts` file: `127.0.0.1 onlyoffice.local`
|
||||
- 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
|
||||
@@ -0,0 +1,19 @@
|
||||
# S3 / Object storage
|
||||
|
||||
## Primary 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 compose up nextcloud minio
|
||||
```
|
||||
|
||||
|
||||
## Using mc command line
|
||||
|
||||
This can be useful for admin operations like setting a bucket quota on the `nc-external` bucket name:
|
||||
|
||||
```
|
||||
docker compose exec minio mc alias set minio http://localhost:9000 nextcloud nextcloud
|
||||
docker compose exec minio mc quota set minio/nc-external --size 1k
|
||||
````
|
||||
@@ -0,0 +1,77 @@
|
||||
|
||||
# SSO/SAML/OpenID Connect
|
||||
|
||||
## [Keycloak](https://www.keycloak.org/)
|
||||
|
||||
- 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
|
||||
|
||||
## 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>
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
# 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`)
|
||||
|
||||
## Recording
|
||||
|
||||
- Make sure to have the recording hostname setup in your `/etc/hosts` file: `127.0.0.1 talk-recording.local`
|
||||
- Make sure the Talk HPB is running and configured
|
||||
- Start the talk recording server in addition to your other containers `docker-compose up -d talk-recording`
|
||||
- Go to the admin settings of talk and add the signaling server (`http://talk-recording.local` with shared secret `6789`)
|
||||
@@ -0,0 +1,18 @@
|
||||
# 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/
|
||||
```
|
||||
@@ -0,0 +1,22 @@
|
||||
# Xdebug
|
||||
|
||||
Xdebug is shipped but disabled by default. It can be turned on by running:
|
||||
|
||||
```
|
||||
./scripts/php-mod-config nextcloud xdebug.mode debug
|
||||
```
|
||||
|
||||
You can also enable other modes, e.g. trace:
|
||||
|
||||
````
|
||||
./scripts/php-mod-config nextcloud xdebug.mode debug,trace
|
||||
```
|
||||
|
||||
### 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
|
||||
```
|
||||
+5
-6
@@ -5,13 +5,13 @@ COMPOSE_PROJECT_NAME=master
|
||||
PROTOCOL=http
|
||||
|
||||
# Paths
|
||||
REPO_PATH_SERVER=/home/jus/workspace/server
|
||||
# REPO_PATH_SERVER=/home/alice/nextcloud-docker-dev/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
|
||||
# ADDITIONAL_APPS_PATH=/home/alice/nextcloud-docker-dev/workspace/server/apps-shared
|
||||
|
||||
# Stable releases root directory
|
||||
STABLE_ROOT_PATH=/home/jus/workspace/
|
||||
# STABLE_ROOT_PATH=/home/alice/nextcloud-docker-dev/workspace
|
||||
|
||||
# Install Nextcloud apps per default
|
||||
# NEXTCLOUD_AUTOINSTALL_APPS="viewer activity"
|
||||
@@ -43,9 +43,8 @@ DOMAIN_SUFFIX=.local
|
||||
# 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
|
||||
# May be used to choose database (sqlite, pgsql, mysql)
|
||||
SQL=mysql
|
||||
|
||||
# The mode of the xdebuger extention. This can be a comma separated list of
|
||||
# the entries none, develop, debug, trace, and profile.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
site_name: nextcloud-docker-dev
|
||||
theme:
|
||||
name: readthedocs
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
Executable
+86
@@ -0,0 +1,86 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
isShallow() {
|
||||
# Reference: https://stackoverflow.com/a/37533086
|
||||
local isShallow
|
||||
isShallow="$(git rev-parse --is-shallow-repository)"
|
||||
if [ "$isShallow" = 'true' ]
|
||||
then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
unshallow() {
|
||||
echo "Unshallowing installation as it is needed"
|
||||
git fetch --unshallow
|
||||
}
|
||||
|
||||
isPartialClone() {
|
||||
git config --get "remote.$1.partialclonefilter" &> /dev/null && return 0 || return 1
|
||||
}
|
||||
|
||||
unpartial () {
|
||||
git config --unset "remote.$1.partialclonefilter"
|
||||
git fetch --refetch
|
||||
}
|
||||
|
||||
UNSHALLOW=1
|
||||
UNPARTIAL=1
|
||||
REPOSITORY=workspace/server
|
||||
ORIGIN=origin
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
--no-unshallow)
|
||||
UNSHALLOW=0
|
||||
;;
|
||||
--unshallow)
|
||||
UNSHALLOW=1
|
||||
;;
|
||||
--no-unpartial)
|
||||
UNPARTIAL=0
|
||||
;;
|
||||
--unpartial)
|
||||
UNPARTIAL=1
|
||||
;;
|
||||
--repository)
|
||||
REPOSITORY="$2"
|
||||
shift
|
||||
;;
|
||||
--origin)
|
||||
ORIGIN="$2"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown parameter '$1' found. Exiting."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
cd "$REPOSITORY"
|
||||
|
||||
if [ "$UNSHALLOW" = 1 ]
|
||||
then
|
||||
if isShallow
|
||||
then
|
||||
unshallow
|
||||
else
|
||||
echo 'The repository is already unshallowed'
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$UNPARTIAL" = 1 ]
|
||||
then
|
||||
if isPartialClone "$ORIGIN"
|
||||
then
|
||||
echo 'Partial clone found'
|
||||
unpartial "$ORIGIN"
|
||||
else
|
||||
echo 'Repository does not contain partial clones'
|
||||
fi
|
||||
fi
|
||||
@@ -1,5 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
# shellcheck source=example.env
|
||||
source "${SCRIPT_DIR}/../.env"
|
||||
# shellcheck source=scripts/functions.sh
|
||||
source "${SCRIPT_DIR}/functions.sh"
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Usage $0 CONTAINER"
|
||||
@@ -9,15 +16,14 @@ fi
|
||||
CONTAINER=$1
|
||||
|
||||
function occ() {
|
||||
docker compose exec "$CONTAINER" sudo -E -u www-data "./occ" "$@"
|
||||
docker_compose exec "$CONTAINER" sudo -E -u www-data "./occ" "$@"
|
||||
}
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source .env
|
||||
|
||||
|
||||
echo "Setting up Collabora with collabora$DOMAIN_SUFFIX on $CONTAINER"
|
||||
docker-compose up -d collabora
|
||||
occ app:enable richdocuments
|
||||
docker_compose up -d collabora
|
||||
occ app:enable richdocuments --force
|
||||
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"
|
||||
|
||||
+19
-12
@@ -1,24 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
# shellcheck source=example.env
|
||||
source "${SCRIPT_DIR}/../.env"
|
||||
# shellcheck source=scripts/functions.sh
|
||||
source "${SCRIPT_DIR}/functions.sh"
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Usage $0 CONTAINER"
|
||||
exit 1
|
||||
then
|
||||
CONTAINER=nextcloud
|
||||
else
|
||||
CONTAINER=$1
|
||||
fi
|
||||
|
||||
CONTAINER=$1
|
||||
|
||||
function occ() {
|
||||
docker compose exec "$CONTAINER" sudo -E -u www-data "./occ" "$@"
|
||||
docker_compose exec "$CONTAINER" sudo -E -u www-data "./occ" "$@"
|
||||
}
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source .env
|
||||
|
||||
echo "Setting up ONLYOFFICE with onlyoffice$DOMAIN_SUFFIX on $CONTAINER"
|
||||
docker-compose up -d onlyoffice
|
||||
docker_compose up -d onlyoffice
|
||||
occ app:enable onlyoffice --force
|
||||
occ config:app:set onlyoffice DocumentServerUrl --value="http://onlyoffice$DOMAIN_SUFFIX"
|
||||
occ config:app:set onlyoffice DocumentServerUrl --value="$PROTOCOL://onlyoffice$DOMAIN_SUFFIX"
|
||||
occ config:app:set onlyoffice jwt_secret --value="secret"
|
||||
occ config:app:set onlyoffice DocumentServerInternalUrl --value="http://onlyoffice/"
|
||||
occ config:app:set onlyoffice StorageUrl --value="http://nextcloud/"
|
||||
occ onlyoffice:documentserver --check
|
||||
|
||||
|
||||
docker-compose exec onlyoffice /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/local.json 'services.CoAuthoring.secret.session.string'
|
||||
docker_compose exec onlyoffice /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/local.json 'services.CoAuthoring.secret.session.string'
|
||||
@@ -1,6 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
# shellcheck source=example.env
|
||||
source "${SCRIPT_DIR}/../.env"
|
||||
# shellcheck source=scripts/functions.sh
|
||||
source "${SCRIPT_DIR}/functions.sh"
|
||||
|
||||
function OCC () {
|
||||
docker compose exec nextcloud sudo -E -u www-data "./occ" "$@"
|
||||
docker_compose exec nextcloud sudo -E -u www-data "./occ" "$@"
|
||||
}
|
||||
|
||||
OCC config:system:set enabledPreviewProviders 0 --value 'OC\Preview\MP3'
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
# shellcheck source=example.env
|
||||
source "${SCRIPT_DIR}/../.env"
|
||||
# shellcheck source=scripts/functions.sh
|
||||
source "${SCRIPT_DIR}/functions.sh"
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Usage $0 CONTAINER"
|
||||
@@ -9,16 +16,13 @@ fi
|
||||
CONTAINER=$1
|
||||
|
||||
function occ() {
|
||||
docker compose exec "$CONTAINER" sudo -E -u www-data "./occ" "$@"
|
||||
docker_compose exec "$CONTAINER" sudo -E -u www-data "./occ" "$@"
|
||||
}
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source .env
|
||||
echo "Setting up talk signaling with ${PROTOCOL:-http}://talk-signaling$DOMAIN_SUFFIX on $CONTAINER"
|
||||
docker_compose up -d talk-signaling talk-janus
|
||||
|
||||
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"
|
||||
if ! occ talk:signaling:list --output="plain" | grep -q "${PROTOCOL:-http}://talk-signaling$DOMAIN_SUFFIX"; then
|
||||
occ talk:signaling:add "${PROTOCOL:-http}://talk-signaling$DOMAIN_SUFFIX" "1234"
|
||||
fi
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
function get_docker_compose_command() {
|
||||
docker-compose version >/dev/null 2>/dev/null && DCC='docker-compose'
|
||||
docker compose version >/dev/null 2>/dev/null && DCC='docker compose'
|
||||
if [ -z "$DCC" ]; then
|
||||
return
|
||||
fi
|
||||
echo "$DCC"
|
||||
}
|
||||
|
||||
function docker_compose() {
|
||||
DCC=$(get_docker_compose_command)
|
||||
if [ -z "$DCC" ]; then
|
||||
echo "❌ Install docker-compose before running this script"
|
||||
exit 1
|
||||
fi
|
||||
$DCC "$@"
|
||||
}
|
||||
+8
-1
@@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
# shellcheck source=example.env
|
||||
source "${SCRIPT_DIR}/../.env"
|
||||
# shellcheck source=scripts/functions.sh
|
||||
source "${SCRIPT_DIR}/functions.sh"
|
||||
|
||||
# Default container name to operate on
|
||||
instance=${INSTANCE:-nextcloud}
|
||||
|
||||
@@ -19,7 +26,7 @@ EOF
|
||||
}
|
||||
|
||||
run_mysql() {
|
||||
docker compose exec database-mysql mysql -u nextcloud -pnextcloud "$instance" "$@"
|
||||
docker_compose exec database-mysql mysql -u nextcloud -pnextcloud "$instance" "$@"
|
||||
exit $?
|
||||
}
|
||||
|
||||
|
||||
+8
-1
@@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
# shellcheck source=example.env
|
||||
source "${SCRIPT_DIR}/../.env"
|
||||
# shellcheck source=scripts/functions.sh
|
||||
source "${SCRIPT_DIR}/functions.sh"
|
||||
|
||||
# Default container name to operate on
|
||||
container=${CONTAINER:-nextcloud}
|
||||
# container_set=
|
||||
@@ -35,7 +42,7 @@ EOF
|
||||
}
|
||||
|
||||
run_occ() {
|
||||
docker compose exec --user www-data "$container" ./occ "$@"
|
||||
docker_compose exec --user www-data "$container" ./occ "$@"
|
||||
exit $?
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
# shellcheck source=example.env
|
||||
source "${SCRIPT_DIR}/../.env"
|
||||
# shellcheck source=scripts/functions.sh
|
||||
source "${SCRIPT_DIR}/functions.sh"
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Usage $0 CONTAINER blackfire on|off"
|
||||
@@ -10,17 +17,12 @@ fi
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
restart() {
|
||||
(cd "$SCRIPT_DIR/.." && docker compose exec "$1" pkill -USR1 apache2)
|
||||
(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 $@)
|
||||
(cd "$SCRIPT_DIR/.." && docker_compose exec $@)
|
||||
}
|
||||
|
||||
if [[ "$2" == "blackfire" ]]
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
# shellcheck source=example.env
|
||||
source "${SCRIPT_DIR}/../.env"
|
||||
# shellcheck source=scripts/functions.sh
|
||||
source "${SCRIPT_DIR}/functions.sh"
|
||||
|
||||
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;
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
# shellcheck source=example.env
|
||||
source "${SCRIPT_DIR}/../.env"
|
||||
# shellcheck source=scripts/functions.sh
|
||||
source "${SCRIPT_DIR}/functions.sh"
|
||||
|
||||
function addhost() {
|
||||
ETC_HOSTS=/etc/hosts
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { test, expect, type Page } from '@playwright/test';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('http://nextcloud.local');
|
||||
});
|
||||
|
||||
|
||||
test.describe('New Todo', () => {
|
||||
test('see the nextcloud login page', async ({ page }) => {
|
||||
await expect(page).toHaveTitle('Login – Nextcloud');
|
||||
});
|
||||
|
||||
test('login to nextcloud as admin', async ({ page }) => {
|
||||
await page.fill('#user', 'admin');
|
||||
await page.fill('#password', 'admin');
|
||||
await page.getByRole('button', { name: 'Log in' }).click();
|
||||
await page.goto('http://nextcloud.local/index.php/apps/files');
|
||||
});
|
||||
});
|
||||
Generated
+91
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"name": "tests",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "tests",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.40.1",
|
||||
"@types/node": "^20.10.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@playwright/test": {
|
||||
"version": "1.40.1",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz",
|
||||
"integrity": "sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"playwright": "1.40.1"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.10.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.2.tgz",
|
||||
"integrity": "sha512-37MXfxkb0vuIlRKHNxwCkb60PNBpR94u4efQuN4JgIAm66zfCDXGSAFCef9XUWFovX2R1ok6Z7MHhtdVXXkkIw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
}
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
||||
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/playwright": {
|
||||
"version": "1.40.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz",
|
||||
"integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"playwright-core": "1.40.1"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/playwright-core": {
|
||||
"version": "1.40.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz",
|
||||
"integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"playwright-core": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "tests",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.40.1",
|
||||
"@types/node": "^20.10.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
/**
|
||||
* Read environment variables from file.
|
||||
* https://github.com/motdotla/dotenv
|
||||
*/
|
||||
// require('dotenv').config();
|
||||
|
||||
/**
|
||||
* See https://playwright.dev/docs/test-configuration.
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: './.',
|
||||
/* Run tests in files in parallel */
|
||||
fullyParallel: true,
|
||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||
forbidOnly: !!process.env.CI,
|
||||
/* Retry on CI only */
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
/* Opt out of parallel tests on CI. */
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
reporter: 'html',
|
||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||
use: {
|
||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
||||
// baseURL: 'http://127.0.0.1:3000',
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
|
||||
/* Configure projects for major browsers */
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
},
|
||||
|
||||
{
|
||||
name: 'firefox',
|
||||
use: { ...devices['Desktop Firefox'] },
|
||||
},
|
||||
|
||||
{
|
||||
name: 'webkit',
|
||||
use: { ...devices['Desktop Safari'] },
|
||||
},
|
||||
|
||||
/* Test against mobile viewports. */
|
||||
// {
|
||||
// name: 'Mobile Chrome',
|
||||
// use: { ...devices['Pixel 5'] },
|
||||
// },
|
||||
// {
|
||||
// name: 'Mobile Safari',
|
||||
// use: { ...devices['iPhone 12'] },
|
||||
// },
|
||||
|
||||
/* Test against branded browsers. */
|
||||
// {
|
||||
// name: 'Microsoft Edge',
|
||||
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
||||
// },
|
||||
// {
|
||||
// name: 'Google Chrome',
|
||||
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
||||
// },
|
||||
],
|
||||
|
||||
/* Run your local dev server before starting the tests */
|
||||
// webServer: {
|
||||
// command: 'npm run start',
|
||||
// url: 'http://127.0.0.1:3000',
|
||||
// reuseExistingServer: !process.env.CI,
|
||||
// },
|
||||
});
|
||||
Reference in New Issue
Block a user