From edf287c47ae2a010f02300a08ebad75ed1271580 Mon Sep 17 00:00:00 2001 From: tycrek Date: Mon, 30 May 2022 16:01:58 -0600 Subject: [PATCH] Final Docker fix hopefully --- Dockerfile | 5 +++-- compose.yaml | 2 +- install/docker-linux.sh | 11 ++++------- install/docker-windows.bat | 11 ++++------- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index f34e90e..ca73b36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,8 @@ COPY . ./ # Update npm to at least npm 8, # then install dependencies RUN npm i -g npm@8 typescript && \ - npm i --save-dev + npm i --save-dev && \ + npm run build # Ensure these directories & files exist for compose volumes RUN mkdir -p /opt/ass/uploads/thumbnails/ && \ @@ -25,4 +26,4 @@ RUN mkdir -p /opt/ass/uploads/thumbnails/ && \ touch /opt/ass/data.json # Start ass -CMD npm run dev +CMD npm start diff --git a/compose.yaml b/compose.yaml index cb2fd1a..5ecfe03 100644 --- a/compose.yaml +++ b/compose.yaml @@ -6,7 +6,7 @@ services: ass: build: . - command: npm run dev + command: npm start container_name: ass-docker restart: unless-stopped ports: diff --git a/install/docker-linux.sh b/install/docker-linux.sh index 7c1505b..3c88eeb 100755 --- a/install/docker-linux.sh +++ b/install/docker-linux.sh @@ -22,14 +22,11 @@ read -n 1 -s -r -p "Press any key to continue..." echo Running setup... -# docker compose up -d -docker compose up -d && \ +# Bring up the container +docker compose up -# Run setup within the container -docker compose exec ass npm run setup && \ - -# Restart the container when complete -docker compose restart && \ +# Restart the container when setup complete +docker compose restart # Done! echo "ass-docker for Linux installed!" diff --git a/install/docker-windows.bat b/install/docker-windows.bat index 18d6622..66dc401 100644 --- a/install/docker-windows.bat +++ b/install/docker-windows.bat @@ -19,14 +19,11 @@ PAUSE ECHO Running setup... -REM docker compose up -d -docker compose up -d && +REM Bring up the container +docker compose up -REM Run setup within the container -docker compose exec ass npm run setup && - -REM Restart the container when complete -docker compose restart && +REM Restart the container when setup complete +docker compose restart REM Done! ECHO ass-docker for Windows installed!