-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
73 lines (63 loc) · 2.55 KB
/
Dockerfile
File metadata and controls
73 lines (63 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM golang:1.23.12-bullseye@sha256:161b8513c09cbfa4c174fd32e46eddc5eddf487a43958b9cf8b07d628e9e0f85 as supercronic
# renovate: datasource=github-tags depName=aptible/supercronic versioning=semver
ENV SUPERCRONIC_VERSION v0.2.33
RUN set -ex; \
git clone --branch $SUPERCRONIC_VERSION https://github.com/aptible/supercronic; \
cd supercronic; \
go mod vendor; \
go install;
FROM nextcloud:30.0.17-fpm@sha256:66b59b33a7af2ef25feff7dd1ad6d2d2e522689abcac3bdc108aacfd8a57c64a
COPY --from=supercronic /go/bin/supercronic /usr/local/bin/supercronic
ENV PHP_MEMORY_LIMIT 4048M
ENV PHP_UPLOAD_LIMIT 16G
ENV PHP_EXECUTION_TIME 3600
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
supervisor \
ffmpeg \
gosu \
; \
rm -rf /var/lib/apt/lists/*; \
\
chmod +x /usr/local/bin/supercronic; \
echo '*/5 * * * * php -f /var/www/html/cron.php' > /crontab; \
\
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"; \
\
{ \
echo "memory_limit=${PHP_MEMORY_LIMIT}"; \
echo "upload_max_filesize=${PHP_UPLOAD_LIMIT}"; \
echo "post_max_size=${PHP_UPLOAD_LIMIT}"; \
echo "max_execution_time=${PHP_EXECUTION_TIME}"; \
echo "max_input_time=${PHP_EXECUTION_TIME}"; \
} > /usr/local/etc/php/conf.d/nextcloud.ini;
ENV NEXTCLOUD_UPDATE=1
COPY supervisord.conf /
# Define the command to run at container start using an inline shell script
ENTRYPOINT ["/bin/bash", "-c", " \
set -e; \
echo 'Starting supervisord...'; \
exec /usr/bin/supervisord -c /supervisord.conf; \
echo 'Waiting for Nextcloud to be ready...'; \
until gosu www-data php occ status >/dev/null 2>&1; do \
echo 'Nextcloud is not ready yet, retrying in 10 seconds...'; \
sleep 10; \
done; \
echo 'Nextcloud is ready.'; \
if ! gosu www-data php occ app:list | grep -q 'files_external: enabled'; then \
echo 'Enabling files_external app...'; \
gosu www-data php occ app:enable files_external; \
else \
echo 'files_external app is already enabled.'; \
fi; \
if ! gosu www-data php occ app:list | grep -q 'files_external_ethswarm'; then \
echo 'Installing and enabling files_external_ethswarm app...'; \
gosu www-data php occ app:install files_external_ethswarm; \
gosu www-data php occ app:enable files_external_ethswarm; \
else \
echo 'files_external_ethswarm app is already installed and enabled.'; \
fi; \
echo 'All apps are enabled and installed successfully.'; \
"]