docker fixed

This commit is contained in:
David Friedrich 2024-11-08 09:32:57 +01:00
parent d84777c2bb
commit a62286c3d5
3 changed files with 9 additions and 8 deletions

View file

@ -1,20 +1,20 @@
FROM node:22.9 FROM node:alpine
# We have to install nodemon globally before moving into the working directory
RUN npm install -g nodemon
# Create app directory # Create app directory
WORKDIR /usr/src/app WORKDIR /usr/src/app
# Install app dependencies # Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied # A wildcard is used to ensure both package.json AND package-lock.json are copied
COPY package*.json ./
#RUN npm install -g nodaemon
COPY package*.json /usr/src/app/
RUN npm install RUN npm install
# Bundle app source #UN npm install -g nodaemon
COPY . . COPY . /usr/src/app/
#RUN npm install
EXPOSE 8080 EXPOSE 8080
CMD ./start.sh CMD ./start.sh

View file

@ -7,5 +7,5 @@ services:
restart: always restart: always
ports: ports:
- 127.0.0.1:8080:8080 - 127.0.0.1:8080:8080
command: bash -c /usr/src/app/start.sh command: sh -c /usr/src/app/start.sh
env_file: .env env_file: .env

View file

@ -22,6 +22,7 @@ export function initViewer(container) {
}; };
const viewer = new Autodesk.Viewing.GuiViewer3D(container, config); const viewer = new Autodesk.Viewing.GuiViewer3D(container, config);
viewer.start(); viewer.start();
viewer.addEventListener(Autodesk.Viewing.TOOLBAR_CREATED_EVENT, onToolbarCreated);
viewer.setTheme("light-theme"); viewer.setTheme("light-theme");
resolve(viewer); resolve(viewer);
} }