From 9a5aa9a53d8c6f61df3ebf62aac415a1c1ea95a3 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Sat, 8 Feb 2025 02:59:49 +0100 Subject: [PATCH] Run command in tmux --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4acb918..4e39a10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM node:23.7.0-alpine +# Install tmux +RUN apk add --no-cache tmux + WORKDIR /usr/src/app COPY package*.json ./ @@ -10,4 +13,5 @@ COPY . . EXPOSE 4000 -CMD npx mikro-orm-esm migration:up && npm run start \ No newline at end of file +# Modify CMD to use tmux +CMD tmux new-session -d -s app 'npx mikro-orm-esm migration:up && npm run start' \; attach-session -t app \ No newline at end of file