Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

update runtime

Alexandera78e612a66ae
diff --git a/docker/prod/Dockerfile b/docker/prod/Dockerfile
index 6f6760823ee..b9a66a932f7 100644
--- a/docker/prod/Dockerfile
+++ b/docker/prod/Dockerfile
@@ -6,6 +6,7 @@ ARG BUNDLER_VERSION="2.5.13"
ARG NODE_VERSION="20.9.0"
ARG BIM_SUPPORT=true
ARG USE_JEMALLOC=false
+ENV USE_JEMALLOC=${USE_JEMALLOC}
ENV DEBIAN_FRONTEND=noninteractive
ENV BUNDLE_JOBS=8
ENV BUNDLE_RETRY=3
@@ -87,6 +88,7 @@ FROM base as slim
USER $APP_USER
EXPOSE 8080
CMD ["./docker/prod/web"]
+ENTRYPOINT ["./docker/prod/entrypoint-slim.sh"]
VOLUME ["$APP_DATA_PATH"]
# -------------------------------------
diff --git a/docker/prod/entrypoint-slim.sh b/docker/prod/entrypoint-slim.sh
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docker/prod/entrypoint.sh b/docker/prod/entrypoint.sh
index cab5ac48198..c8c34527dfb 100755
--- a/docker/prod/entrypoint.sh
+++ b/docker/prod/entrypoint.sh
@@ -5,6 +5,11 @@ set -o pipefail
APACHE_PIDFILE=/run/apache2/apache2.pid
+# Use jemalloc at runtime
+if [ "$USE_JEMALLOC" = "true" ]; then
+ export LD_PRELOAD=libjemalloc.so.2
+fi
+
# handle legacy configs
if [ -f "/var/lib/postgresql/9.6/main/PG_VERSION" ]; then
echo "ERROR: You are using a legacy volume path for your postgres data. You should mount your postgres volumes at $PGDATA instead of /var/lib/postgresql/9.6/main"