Browse Source

feat(tool): Use apache as web server again

pull/486/head
jld3103 1 year ago
parent
commit
7025574902
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 6
      tool/Dockerfile.dev
  2. 2
      tool/dev.sh
  3. 2
      tool/update.sh

6
tool/Dockerfile.dev

@ -1,5 +1,7 @@
FROM nextcloud:27.0.0-fpm-alpine FROM nextcloud:27.0.0
WORKDIR /usr/src/nextcloud WORKDIR /usr/src/nextcloud
RUN chown -R www-data:www-data .
USER www-data
RUN ./occ maintenance:install --admin-pass admin --admin-email admin@example.com RUN ./occ maintenance:install --admin-pass admin --admin-email admin@example.com
RUN ./occ config:system:set allow_local_remote_servers --value=true RUN ./occ config:system:set allow_local_remote_servers --value=true
@ -18,5 +20,3 @@ RUN (sh /entrypoint.sh php -S 0.0.0.0:8080 &) && \
until curl -s -o /dev/null http://localhost:8080/status.php; do true; done && \ until curl -s -o /dev/null http://localhost:8080/status.php; do true; done && \
for user in admin user1 user2; do curl -u "$user:$user" -H "ocs-apirequest: true" -s -o /dev/null http://localhost:8080/ocs/v2.php/cloud/user; done for user in admin user1 user2; do curl -u "$user:$user" -H "ocs-apirequest: true" -s -o /dev/null http://localhost:8080/ocs/v2.php/cloud/user; done
COPY --chown=www-data:www-data overlay /usr/src/nextcloud/ COPY --chown=www-data:www-data overlay /usr/src/nextcloud/
CMD ["php", "-S", "0.0.0.0:80"]

2
tool/dev.sh

@ -5,4 +5,4 @@ cd "$(dirname "$0")/.."
./tool/build-dev-container.sh ./tool/build-dev-container.sh
echo "Running development instance on http://localhost. To access it in an Android Emulator use http://10.0.2.2" echo "Running development instance on http://localhost. To access it in an Android Emulator use http://10.0.2.2"
docker run --rm -v nextcloud-neon-dev:/usr/src/nextcloud -v nextcloud-neon-dev:/var/www/html -p "80:80" --net="host" nextcloud-neon-dev docker run --rm -v nextcloud-neon-dev:/usr/src/nextcloud -v nextcloud-neon-dev:/var/www/html -p "80:80" --add-host=host.docker.internal:host-gateway nextcloud-neon-dev

2
tool/update.sh

@ -27,7 +27,7 @@ elif [ -d "external/nextcloud-$1" ]; then
# shellcheck disable=SC2001 # shellcheck disable=SC2001
latest_version=$(echo "$latest_tag" | sed "s/^v//") latest_version=$(echo "$latest_tag" | sed "s/^v//")
if [[ "$1" == "server" ]]; then if [[ "$1" == "server" ]]; then
sed -i "s/FROM nextcloud:.*/FROM nextcloud:$latest_version-fpm-alpine/" ../../tool/Dockerfile.dev sed -i "s/FROM nextcloud:.*/FROM nextcloud:$latest_version/" ../../tool/Dockerfile.dev
else else
sed -i "s/RUN \.\/occ app:install $1 .*/RUN .\/occ app:install $1 --force --allow-unstable # $latest_version/" ../../tool/Dockerfile.dev sed -i "s/RUN \.\/occ app:install $1 .*/RUN .\/occ app:install $1 --force --allow-unstable # $latest_version/" ../../tool/Dockerfile.dev
fi fi

Loading…
Cancel
Save