This commit is contained in:
parent
610713e717
commit
7b42bd2d03
@ -91,6 +91,35 @@ RUN set -ex; \
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
# launch and configure Unit
|
||||
RUN \
|
||||
[ -f /var/www/html/index.php ] || { \
|
||||
touch /var/www/html/index.php /var/www/html/index.php.remove; \
|
||||
} \
|
||||
&& unitd --control unix:/var/run/control.unit.sock \
|
||||
&& curl -X PUT --data-binary \
|
||||
'{ \
|
||||
"listeners": { "*:9000": { "pass": "routes" } }, \
|
||||
"routes": [ \
|
||||
{ "action": { "pass": "applications/index_php" } } \
|
||||
], \
|
||||
"applications": { \
|
||||
"index_php": { \
|
||||
"type": "php", \
|
||||
"processes": { "max": 20, "spare": 5 }, \
|
||||
"user": "www-data", \
|
||||
"group": "www-data", \
|
||||
"root": "/var/www/html", \
|
||||
"script": "index.php" \
|
||||
} \
|
||||
} \
|
||||
}' \
|
||||
--unix-socket /var/run/control.unit.sock http://localhost/config/ \
|
||||
&& [ -f /var/www/html/index.php.remove ] && { \
|
||||
rm /var/www/html/index.php /var/www/html/index.php.remove; \
|
||||
}
|
||||
|
||||
EXPOSE 9000
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
STOPSIGNAL SIGTERM
|
||||
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]
|
||||
|
0
14.0/unit/entrypoint.sh
Normal file → Executable file
0
14.0/unit/entrypoint.sh
Normal file → Executable file
@ -91,6 +91,35 @@ RUN set -ex; \
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
# launch and configure Unit
|
||||
RUN \
|
||||
[ -f /var/www/html/index.php ] || { \
|
||||
touch /var/www/html/index.php /var/www/html/index.php.remove; \
|
||||
} \
|
||||
&& unitd --control unix:/var/run/control.unit.sock \
|
||||
&& curl -X PUT --data-binary \
|
||||
'{ \
|
||||
"listeners": { "*:9000": { "pass": "routes" } }, \
|
||||
"routes": [ \
|
||||
{ "action": { "pass": "applications/index_php" } } \
|
||||
], \
|
||||
"applications": { \
|
||||
"index_php": { \
|
||||
"type": "php", \
|
||||
"processes": { "max": 20, "spare": 5 }, \
|
||||
"user": "www-data", \
|
||||
"group": "www-data", \
|
||||
"root": "/var/www/html", \
|
||||
"script": "index.php" \
|
||||
} \
|
||||
} \
|
||||
}' \
|
||||
--unix-socket /var/run/control.unit.sock http://localhost/config/ \
|
||||
&& [ -f /var/www/html/index.php.remove ] && { \
|
||||
rm /var/www/html/index.php /var/www/html/index.php.remove; \
|
||||
}
|
||||
|
||||
EXPOSE 9000
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
STOPSIGNAL SIGTERM
|
||||
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]
|
||||
|
0
15.0/unit/entrypoint.sh
Normal file → Executable file
0
15.0/unit/entrypoint.sh
Normal file → Executable file
@ -91,6 +91,35 @@ RUN set -ex; \
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
# launch and configure Unit
|
||||
RUN \
|
||||
[ -f /var/www/html/index.php ] || { \
|
||||
touch /var/www/html/index.php /var/www/html/index.php.remove; \
|
||||
} \
|
||||
&& unitd --control unix:/var/run/control.unit.sock \
|
||||
&& curl -X PUT --data-binary \
|
||||
'{ \
|
||||
"listeners": { "*:9000": { "pass": "routes" } }, \
|
||||
"routes": [ \
|
||||
{ "action": { "pass": "applications/index_php" } } \
|
||||
], \
|
||||
"applications": { \
|
||||
"index_php": { \
|
||||
"type": "php", \
|
||||
"processes": { "max": 20, "spare": 5 }, \
|
||||
"user": "www-data", \
|
||||
"group": "www-data", \
|
||||
"root": "/var/www/html", \
|
||||
"script": "index.php" \
|
||||
} \
|
||||
} \
|
||||
}' \
|
||||
--unix-socket /var/run/control.unit.sock http://localhost/config/ \
|
||||
&& [ -f /var/www/html/index.php.remove ] && { \
|
||||
rm /var/www/html/index.php /var/www/html/index.php.remove; \
|
||||
}
|
||||
|
||||
EXPOSE 9000
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
STOPSIGNAL SIGTERM
|
||||
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]
|
||||
|
0
16.0/unit/entrypoint.sh
Normal file → Executable file
0
16.0/unit/entrypoint.sh
Normal file → Executable file
@ -90,6 +90,35 @@ RUN set -ex; \
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
# launch and configure Unit
|
||||
RUN \
|
||||
[ -f /var/www/html/index.php ] || { \
|
||||
touch /var/www/html/index.php /var/www/html/index.php.remove; \
|
||||
} \
|
||||
&& unitd --control unix:/var/run/control.unit.sock \
|
||||
&& curl -X PUT --data-binary \
|
||||
'{ \
|
||||
"listeners": { "*:9000": { "pass": "routes" } }, \
|
||||
"routes": [ \
|
||||
{ "action": { "pass": "applications/index_php" } } \
|
||||
], \
|
||||
"applications": { \
|
||||
"index_php": { \
|
||||
"type": "php", \
|
||||
"processes": { "max": 20, "spare": 5 }, \
|
||||
"user": "www-data", \
|
||||
"group": "www-data", \
|
||||
"root": "/var/www/html", \
|
||||
"script": "index.php" \
|
||||
} \
|
||||
} \
|
||||
}' \
|
||||
--unix-socket /var/run/control.unit.sock http://localhost/config/ \
|
||||
&& [ -f /var/www/html/index.php.remove ] && { \
|
||||
rm /var/www/html/index.php /var/www/html/index.php.remove; \
|
||||
}
|
||||
|
||||
EXPOSE 9000
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
STOPSIGNAL SIGTERM
|
||||
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]
|
||||
|
0
docker-entrypoint.sh
Normal file → Executable file
0
docker-entrypoint.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user