From 3c7ab6e3d0848c8b8fa5e51a81e1521c439876b9 Mon Sep 17 00:00:00 2001 From: Christian Landgren Date: Wed, 18 Sep 2024 12:03:45 +0200 Subject: [PATCH] fix: add build script to docker file --- Dockerfile | 1 + api/server.ts | 1 + package.json | 2 +- tsconfig.json | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c464d1d..e0ccd44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,5 @@ RUN npm install --omit=dev RUN npm install -g ts-node COPY . . EXPOSE 3000 +RUN npm run build CMD ["ts-node", "api/server.ts"] \ No newline at end of file diff --git a/api/server.ts b/api/server.ts index 73bbf81..a15c2c1 100644 --- a/api/server.ts +++ b/api/server.ts @@ -23,6 +23,7 @@ const io = new Server(server, { }, }) +app.use('/', express.static(path.join(__dirname, '../dist'))) app.use('/assets', express.static(path.join(__dirname, '../assets'))) app.get('/healthz', (req, res) => res.send('ok')) diff --git a/package.json b/package.json index fda446f..be3e684 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", - "serve": "expo export && npx serve dist -p 3000", + "build": "expo export", "deploy": "gh-pages -d dist", "predeploy": "expo export && echo skaff.iteam.pub > dist/CNAME" }, diff --git a/tsconfig.json b/tsconfig.json index b9567f6..340e8b1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "extends": "expo/tsconfig.base", "compilerOptions": { - "strict": true + "strict": false } }