diff --git a/Dockerfile.dev b/Dockerfile.dev index d43b45afa..95e34a5c3 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -61,6 +61,9 @@ FROM base AS dist COPY --from=devcontainer /app/node_modules/ /app/node_modules/ COPY --from=devcontainer /app/dist/ /app/dist/ +# Required for prisma +COPY --from=devcontainer /app/libraries/ /app/libraries/ + COPY package.json nx.json /app/ VOLUME /config diff --git a/README.md b/README.md index 52d15c8e2..886783843 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Facebook Pinterest Threads + X

diff --git a/apps/backend/src/main.ts b/apps/backend/src/main.ts index 6b0bd131e..7cc0a962e 100644 --- a/apps/backend/src/main.ts +++ b/apps/backend/src/main.ts @@ -35,8 +35,14 @@ async function bootstrap() { loadSwagger(app); const port = process.env.PORT || 3000; - await app.listen(port); - Logger.log(`🚀 Application is running on: http://localhost:${port}`); + + try { + await app.listen(port); + + Logger.log(`🚀 Backend is running on: http://localhost:${port}`); + } catch (e) { + Logger.error(`Backend failed to start on port ${port}`, e); + } } bootstrap(); diff --git a/var/docker/entrypoint.sh b/var/docker/entrypoint.sh index 526ca6f32..df3b13fdc 100755 --- a/var/docker/entrypoint.sh +++ b/var/docker/entrypoint.sh @@ -38,4 +38,4 @@ if [[ $POSTIZ_APPS == *"backend"* ]]; then ln -sf /app/supervisord_available_configs/backend.conf /etc/supervisor.d/ fi -/usr/bin/supervisord +/usr/bin/supervisord -c /etc/supervisord.conf diff --git a/var/docker/supervisord.conf b/var/docker/supervisord.conf index a957fc23e..f99f80df3 100644 --- a/var/docker/supervisord.conf +++ b/var/docker/supervisord.conf @@ -2,6 +2,7 @@ nodaemon=true logfile=/dev/null logfile_maxbytes=0 +user=root [unix_http_server] file=/run/supervisord.sock diff --git a/var/docker/supervisord/frontend.conf b/var/docker/supervisord/frontend.conf index 53c03a6f5..9199b52e1 100644 --- a/var/docker/supervisord/frontend.conf +++ b/var/docker/supervisord/frontend.conf @@ -6,3 +6,4 @@ autorestart=false redirect_stderr=true stdout_logfile=/dev/fd/1 stdout_logfile_maxbytes=0 +environment=PORT=4200