diff --git a/docker/production/unit/Dockerfile b/docker/production/unit/Dockerfile
index ab2cad76bc7d9b0365d0d922e83f9d5fe7677cbb..8cf5d121c872c353bad01f41ee70bfe5dcd1881a 100644
--- a/docker/production/unit/Dockerfile
+++ b/docker/production/unit/Dockerfile
@@ -37,9 +37,10 @@ COPY docker/production/unit/entrypoint.sh /entrypoint.sh
 COPY castopod /var/www/castopod
 COPY docker/production/unit/config.json /config.json
 COPY docker/production/unit/crontab.txt /crontab.txt
+COPY docker/production/unit/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
 
 RUN apt-get update && \
-    apt-get install -y ffmpeg curl libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev libxpm-dev libpcre2-8-0 libicu-dev && \
+    apt-get install -y supervisor ffmpeg curl libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev libxpm-dev libpcre2-8-0 libicu-dev && \
     rm -rf /var/lib/apt/lists/* && \
     pecl install -o -f redis && \
     rm -rf /tmp/pear && \
diff --git a/docker/production/unit/entrypoint.sh b/docker/production/unit/entrypoint.sh
index 019040739d2bfb21ad92765c0ecae5c161517c64..9526d7e1404421d550a44ee321cf3c8cd5a0fa33 100644
--- a/docker/production/unit/entrypoint.sh
+++ b/docker/production/unit/entrypoint.sh
@@ -191,7 +191,8 @@ EOF
 	fi
 fi
 
-unitd --no-daemon &
-php spark castopod:database-update
-sleep 2 && curl -X PUT --data-binary @/config.json --unix-socket /var/run/control.unit.sock http://localhost/config/
-supercronic /crontab.txt
+#Run database migrations after 10 seconds (to wait for the database to be started)
+(sleep 10 && php spark castopod:database-update) &
+#Apply configuration after unit is started
+(sleep 2 && curl -X PUT --data-binary @/config.json --unix-socket /var/run/control.unit.sock http://localhost/config/) &
+supervisord
diff --git a/docker/production/unit/supervisord.conf b/docker/production/unit/supervisord.conf
new file mode 100644
index 0000000000000000000000000000000000000000..fe2939be792a230fe9d925e843c5490864666fa2
--- /dev/null
+++ b/docker/production/unit/supervisord.conf
@@ -0,0 +1,19 @@
+[supervisord]
+nodaemon=true
+
+[program:supercronic]
+command=supercronic /crontab.txt
+autostart=true
+autorestart=unexpected
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
+
+[program:unit]
+command=unitd --no-daemon
+autostart=true
+autorestart=unexpected
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile_maxbytes=0