fix: Move from docker-compose to docker compose by default

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-12-15 20:21:50 +01:00
parent b288a4e70f
commit d8596f8952
33 changed files with 125 additions and 79 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ jobs:
if ! [[ $PHP_VERSION =~ ^[0-9]+$ ]] || [[ $PHP_VERSION -lt 80 ]]; then
exit 0
fi
docker-compose up -d nextcloud
docker compose up -d nextcloud
# wait for nextcloud to be up
# wait up to 5 minutes
for i in {1..300}; do
+2 -2
View File
@@ -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:
+5 -3
View File
@@ -2,7 +2,7 @@
[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.
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
@@ -36,14 +36,16 @@ 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
docker compose up nextcloud
```
You can also start it in the background using `docker-compose up -d 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).
+1 -1
View File
@@ -387,7 +387,7 @@ check_source() {
if [ -f "$FILE" ]; then
output "Server source is mounted, continuing"
else
# Only autoinstall when not running in docker-compose
# Only autoinstall when not running in docker compose
if [ -n "$NEXTCLOUD_AUTOINSTALL_APPS" ] && [ ! -f "$WEBROOT"/config/version.php ]
then
output "======================================================================================="
+3 -2
View File
@@ -20,13 +20,14 @@ cd nextcloud-docker-dev
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
docker compose up nextcloud
```
You can also start it in the background using `docker-compose up -d 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).
+1 -1
View File
@@ -35,7 +35,7 @@ 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
docker compose exec nextcloud php cron.php
```
### occ
+1 -1
View File
@@ -10,7 +10,7 @@ mkcert is a simple tool for making locally-trusted development certificates. It
* 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`
* `docker compose restart proxy`
* There is also a script to generate/update all certs: `./scripts/update-certs`
## Use self-signed certificates
+1 -1
View File
@@ -29,7 +29,7 @@ git worktree add ../../../stable28/apps/viewer stable28
## Start the stable28 container
```bash
docker-compose up -d stable28
docker compose up -d stable28
```
## Apps without stable branches
+5 -5
View File
@@ -1,13 +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.
`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.
- 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
- 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
+5 -4
View File
@@ -3,16 +3,17 @@
## Updating the development environment
- `git pull` to get the latest changes
- `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 proxy nextcloud ...` for the containers in use.
- 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, you only need to call occ update on demand
```bash
docker-compose exec nextcloud occ upgrade
docker compose exec nextcloud occ upgrade
```
### Major version bump
+1 -1
View File
@@ -10,4 +10,4 @@ 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.
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.
+2 -2
View File
@@ -6,10 +6,10 @@ It can be useful to be able to access your setup quickly through your shell. Her
## 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`.
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 $@)
(cd ~/path/to/nextcloud-docker-dev && docker compose $@)
}
```
+1 -1
View File
@@ -1,4 +1,4 @@
This documentation covers a Nextcloud development environment using docker-compose providing a large variety of services for Nextcloud server and app development and testing.
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**
+1 -1
View File
@@ -1,7 +1,7 @@
# Antivirus
```bash
docker-compose up -d proxy nextcloud av
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
+11 -11
View File
@@ -10,7 +10,7 @@ By default, MySQL will be used as database backend. You can change this by setti
- `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`.
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:
@@ -26,24 +26,24 @@ All databases use the following credentials by default:
You can access the database with the following command:
```bash
docker-compose exec mariadb mysql -u root -pnextcloud
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>.
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.
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
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>.
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-postgresql 5432`. The host is `localhost` and the credentials are the same as above.
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-postgresql 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`
@@ -53,7 +53,7 @@ That's it, open the following path to see the Nextcloud tables: `Server group 1
You can access the database with the following command:
```bash
docker-compose exec nextcloud sqlite3 /var/www/html/data/nextcloud.db
docker compose exec nextcloud sqlite3 /var/www/html/data/nextcloud.db
```
### MariaDB Replica
@@ -63,12 +63,12 @@ This mode runs a mariadb primary and read replica setup. The primary is used for
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
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`.
The logs of MaxScale can be accessed with `docker compose exec maxscale cat /var/log/maxscale/maxscale.log`.
+1 -1
View File
@@ -3,6 +3,6 @@
Enable the imaginary server for generating previews
```bash
docker-compose up proxy nextcloud previews_hpb
docker compose up proxy nextcloud previews_hpb
./scripts/enable-preview-imaginary.sh
```
+1 -1
View File
@@ -8,4 +8,4 @@ Example users are: `leela fry bender zoidberg hermes professor`. The password is
- 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*))"`
- `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*))"`
+2 -2
View File
@@ -1,7 +1,7 @@
## Global scale
```
docker-compose up -d proxy portal gs1 gs2 lookup database-mysql
docker compose up -d proxy portal gs1 gs2 lookup database-mysql
```
Users are named the same as the instance name, e.g. `gs1`, `gs2`
@@ -9,7 +9,7 @@ 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
docker compose up -d elasticsearch elasticsearch-ui
```
- Address for configuring in Nextcloud: `http://elastic:elastic@elasticsearch:9200`
+1 -1
View File
@@ -16,7 +16,7 @@ It requires to have the [richdocuments](https://github.com/nextcloud/richdocumen
- 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`
- 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
+1 -1
View File
@@ -23,6 +23,6 @@ It requires to have the onlyoffice integration app cloned into your apps directo
## 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`
- 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
+1 -1
View File
@@ -5,5 +5,5 @@
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
docker compose up nextcloud minio
```
+1 -1
View File
@@ -12,7 +12,7 @@
## SAML
```
docker-compose up -d proxy nextcloud saml
docker compose up -d proxy nextcloud saml
```
- uid mapping: `urn:oid:0.9.2342.19200300.100.1.1`
+1 -1
View File
@@ -4,5 +4,5 @@
- 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`
- 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`)
+1 -1
View File
@@ -13,6 +13,6 @@ After that you can use Blackfire through the browser plugin or curl as described
### Using with curl
```
alias blackfire='docker-compose exec -e BLACKFIRE_CLIENT_ID=$BLACKFIRE_CLIENT_ID -e BLACKFIRE_CLIENT_TOKEN=$BLACKFIRE_CLIENT_TOKEN blackfire blackfire'
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/
```
+10 -4
View File
@@ -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,14 +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 Collabora with collabora$DOMAIN_SUFFIX on $CONTAINER"
docker-compose up -d collabora
docker_compose up -d collabora
occ app:enable richdocuments
occ config:app:set richdocuments wopi_url --value="${PROTOCOL:-http}://collabora${DOMAIN_SUFFIX}"
occ config:app:set richdocuments public_wopi_url --value="${PROTOCOL:-http}://collabora${DOMAIN_SUFFIX}"
+10 -6
View File
@@ -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
CONTAINER=nextcloud
@@ -8,14 +15,11 @@ else
fi
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="$PROTOCOL://onlyoffice$DOMAIN_SUFFIX"
occ config:app:set onlyoffice jwt_secret --value="secret"
@@ -24,4 +28,4 @@ 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'
+9 -1
View File
@@ -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'
+9 -5
View File
@@ -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,14 +16,11 @@ 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 http://talk-signaling$DOMAIN_SUFFIX on $CONTAINER"
docker-compose up -d talk-signaling talk-janus
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"
+8 -1
View File
@@ -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
View File
@@ -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 $?
}
+9 -7
View File
@@ -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" ]]
+7 -5
View File
@@ -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;
+4 -2
View File
@@ -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