Compare commits

..

1 Commits

Author SHA1 Message Date
Julius Knorr 2357335a03 chore: simplify dsp setup
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-02-27 13:25:28 +01:00
4 changed files with 2 additions and 145 deletions
-1
View File
@@ -22,7 +22,6 @@ jobs:
fail-fast: false
matrix:
container:
- php84-fpm
- php84
- php83
- php82
-18
View File
@@ -1087,7 +1087,6 @@ services:
appapi-dsp:
image: ghcr.io/nextcloud/nextcloud-appapi-dsp:release
container_name: nextcloud-appapi-dsp-http
network_mode: ${NETWORK_MODE:-master_default}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
@@ -1100,23 +1099,6 @@ services:
- EX_APPS_NET=${EX_APPS_NET:-ipv4@localhost}
- EX_APPS_COUNT=${EX_APPS_COUNT:-50}
appapi-dsp-https:
image: ghcr.io/nextcloud/nextcloud-appapi-dsp:release
container_name: nextcloud-appapi-dsp-https
network_mode: ${NETWORK_MODE:-host}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${CERT_PATH:-./data/ssl/app_api/app_api.pem}:/certs/cert.pem
environment:
- NC_HAPROXY_PASSWORD=${NC_HAPROXY_PASSWORD:-some_secure_password}
- BIND_ADDRESS=${BIND_ADDRESS:-172.17.0.1}
- HAPROXY_PORT=${HAPROXY_PORT:-2375}
- TIMEOUT_CONNECT=${TIMEOUT_CONNECT:-10s}
- TIMEOUT_CLIENT=${TIMEOUT_CLIENT:-30s}
- TIMEOUT_SERVER=${TIMEOUT_SERVER:-30s}
- EX_APPS_NET=${EX_APPS_NET:-ipv4@localhost}
- EX_APPS_COUNT=${EX_APPS_COUNT:-50}
volumes:
data:
-124
View File
@@ -1,124 +0,0 @@
FROM php:8.4-fpm
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions
RUN install-php-extensions \
apcu \
bcmath \
excimer \
exif \
gd \
gmp \
intl \
ldap \
memcached \
oci8 \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
redis \
smbclient \
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 \
apache2 \
git curl vim nano 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 \
&& ln -s /usr/local/bin/phpunit9 /usr/local/bin/phpunit
# 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 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 { \
echo '[global]'; \
echo 'client min protocol = SMB2'; \
echo 'client max protocol = SMB3'; \
echo 'hide dot files = no'; \
} > /etc/samba/smb.conf
RUN mkdir --parent /var/log/cron
ADD configs/cron.conf /etc/nc-cron.conf
RUN crontab /etc/nc-cron.conf
ADD configs/php/nextcloud.ini /usr/local/etc/php/conf.d/nextcloud.ini
ADD configs/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# Setup blackfire probe
RUN wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list \
&& apt-get update \
&& (apt-get install -y --no-install-recommends blackfire \
&& 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/*
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# mod_rewrite
RUN a2enmod rewrite headers
# increase limit request body
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-available/limit-request-body.conf && a2enconf limit-request-body
VOLUME /var/www/html
VOLUME /var/www/html/apps-writable
VOLUME /var/www/html/config
VOLUME /var/www/html/data
ENV SQL sqlite
ENV NEXTCLOUD_AUTOINSTALL YES
ENV WITH_REDIS NO
ENV WEBROOT /var/www/html
WORKDIR /var/www/html
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
ADD https://raw.githubusercontent.com/docker-library/php/refs/heads/master/apache2-foreground /usr/bin/apache2-foreground
RUN chmod +x /usr/bin/apache2-foreground
RUN { \
echo '<FilesMatch \.php$>'; \
echo '\tSetHandler "proxy:fcgi://localhost:9000"'; \
echo '</FilesMatch>'; \
echo; \
echo 'DirectoryIndex disabled'; \
echo 'DirectoryIndex index.php index.html'; \
echo; \
echo '<Directory /var/www/>'; \
echo '\tOptions -Indexes'; \
echo '\tAllowOverride All'; \
echo '</Directory>'; \
} | tee "/etc/apache2/conf-available/docker-php.conf" \
&& a2enconf docker-php
RUN a2enmod proxy_fcgi setenvif
EXPOSE 80
CMD ["bash", "-c", "php-fpm -D && apache2-foreground"]
ADD data/installing.html /root/installing.html
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/
+2 -2
View File
@@ -14,7 +14,7 @@ docker compose up -d appapi-dsp
After the DSP container is running, configure the Deploy daemon in AppAPI admin settings with the following parameters:
- **Host**: `http://nextcloud-appapi-dsp-http:2375`
- **Host**: `http://appapi-dsp:2375`
- **Nextcloud URL**: `http://nextcloud.local` (locally always use http)
- **Enable https**: `false`
- **Network**: `master_default` (the network of nextcloud-docker-dev docker-compose, by default it is `master_default`)
@@ -23,7 +23,7 @@ After the DSP container is running, configure the Deploy daemon in AppAPI admin
or via OCC CLI:
```bash
./scripts/occ.sh nextcloud -- app_api:daemon:register dsp_http "DSP HTTP" docker-install http "nextcloud-appapi-dsp-http" "http://nextcloud.local" --net=master_default --set-default
./scripts/occ.sh nextcloud -- app_api:daemon:register dsp_http "DSP" docker-install http "appapi-dsp:2375" "https://nextcloud.local" --set-default --haproxy_password some_secure_password --net nextcloud_default
```
## HTTPS AppAPI DSP