Run command in tmux

This commit is contained in:
Dennis Postma 2025-02-08 02:59:49 +01:00
parent 2d5a445af0
commit 9a5aa9a53d

View File

@ -1,5 +1,8 @@
FROM node:23.7.0-alpine FROM node:23.7.0-alpine
# Install tmux
RUN apk add --no-cache tmux
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY package*.json ./ COPY package*.json ./
@ -10,4 +13,5 @@ COPY . .
EXPOSE 4000 EXPOSE 4000
CMD npx mikro-orm-esm migration:up && npm run start # 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