Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0ea040a0b8 | |||
| 9ae50462bb | |||
| 18e63accec | |||
| 845e87e1f7 | |||
| 40bfbf83c4 | |||
| b8fbafdc5e | |||
| 55aa6d8fc0 |
@@ -7,6 +7,8 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
|
||||
jobs:
|
||||
@@ -76,19 +78,20 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: ${{ steps.dockerfile.outputs.DOCKERFILE }}
|
||||
tags: |
|
||||
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}
|
||||
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: Push container image
|
||||
uses: docker/build-push-action@v5
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||
with:
|
||||
push: true
|
||||
context: docker/
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: ${{ steps.dockerfile.outputs.DOCKERFILE }}
|
||||
tags: |
|
||||
ghcr.io/juliushaertl/nextcloud-dev-${{ matrix.container }}
|
||||
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 }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
- name: Move cache
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Hook scripts
|
||||
|
||||
Scripts in this directory will be picked up by the docker containers
|
||||
automatically. They can be used for automating setup specific to a developers
|
||||
use cases
|
||||
|
||||
- For all Nextcloud containers:
|
||||
- before-install.sh
|
||||
- after-install.sh
|
||||
|
||||
|
||||
## Example for before-start.sh
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
echo "🎉🎉🎉🎉🎉🎉🎉🎉 triggered hook before-start.sh"
|
||||
env
|
||||
export OC_PASS="mycustomuser"
|
||||
occ user:add --password-from-env mycustomuser
|
||||
```
|
||||
+1
-1
@@ -765,7 +765,7 @@ services:
|
||||
NEXTCLOUD_URL: http://nextcloud
|
||||
|
||||
keycloak:
|
||||
image: quay.io/keycloak/keycloak:22.0
|
||||
image: quay.io/keycloak/keycloak:23.0
|
||||
expose:
|
||||
- 8080
|
||||
volumes:
|
||||
|
||||
@@ -22,7 +22,7 @@ RUN install-php-extensions \
|
||||
redis \
|
||||
smbclient \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
xdebug-^3.2 \
|
||||
zip \
|
||||
@composer
|
||||
|
||||
|
||||
+22
-1
@@ -199,6 +199,8 @@ install() {
|
||||
USER="admin"
|
||||
PASSWORD="admin"
|
||||
|
||||
run_hook_before_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
|
||||
@@ -285,9 +287,27 @@ install() {
|
||||
configure_add_user alice &
|
||||
configure_add_user bob &
|
||||
|
||||
run_hook_after_install
|
||||
|
||||
output "🚀 Finished setup using $SQL database…"
|
||||
}
|
||||
|
||||
run_hook_before_install() {
|
||||
[ -e /shared/hooks/before-install.sh ] && bash /shared/hooks/before-install.sh
|
||||
}
|
||||
|
||||
run_hook_after_install() {
|
||||
[ -e /shared/hooks/after-install.sh ] && bash /shared/hooks/after-install.sh
|
||||
}
|
||||
|
||||
run_hook_before_start() {
|
||||
[ -e /shared/hooks/before-start.sh ] && bash /shared/hooks/before-start.sh
|
||||
}
|
||||
|
||||
run_hook_after_start() {
|
||||
[ -e /shared/hooks/after-start.sh ] && bash /shared/hooks/after-start.sh
|
||||
}
|
||||
|
||||
add_hosts() {
|
||||
echo "Add the host IP as host.docker.internal to /etc/hosts ..."
|
||||
ip -4 route list match 0/0 | awk '{print $3 " host.docker.internal"}' >> /etc/hosts
|
||||
@@ -310,7 +330,6 @@ setup() {
|
||||
install
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
check_source() {
|
||||
FILE=/var/www/html/status.php
|
||||
@@ -348,9 +367,11 @@ pkill -USR1 apache2
|
||||
check_source
|
||||
wait_for_other_containers
|
||||
setup
|
||||
run_hook_before_start
|
||||
rm /etc/apache2/conf-enabled/install.conf
|
||||
rm -f /var/www/html/installing.html
|
||||
pkill -USR1 apache2
|
||||
run_hook_after_start
|
||||
) &
|
||||
|
||||
touch /var/log/cron/nextcloud.log "$WEBROOT"/data/nextcloud.log /var/log/xdebug.log
|
||||
|
||||
@@ -22,7 +22,7 @@ RUN install-php-extensions \
|
||||
redis \
|
||||
smbclient \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
xdebug-^3.2 \
|
||||
zip \
|
||||
@composer
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ RUN install-php-extensions \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
imagick \
|
||||
# waiting for https://github.com/mlocati/docker-php-extension-installer/pull/811
|
||||
# imagick \
|
||||
intl \
|
||||
ldap \
|
||||
oci8 \
|
||||
@@ -22,7 +23,7 @@ RUN install-php-extensions \
|
||||
redis \
|
||||
smbclient \
|
||||
sysvsem \
|
||||
xdebug \
|
||||
# xdebug \
|
||||
zip \
|
||||
@composer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user