Consolidate app files

This commit is contained in:
Alan Grainger committed 2024-11-02 22:18:04 +01:00
1 parent 12064d740f
commit 69d88fa849
32 files changed
+15 -13

No files matched your search

+1 -1
View File
@@ -1,2 +1,2 @@
node_modules/
dist/
dist/
+5 -4
View File
@@ -1,5 +1,6 @@
/node_modules/
/dist/
/.idea/
node_modules/
dist/
.idea
.env
/package-lock.json
.directory
package-lock.json
+8 -3
View File
@@ -2,11 +2,12 @@ FROM node:lts-slim
WORKDIR /app
COPY package.json ./
COPY app/package.json ./
RUN npm install --omit=dev
RUN npm install pm2 -g
COPY . .
COPY app/ ./
ENV NODE_ENV=production
@@ -14,4 +15,8 @@ ENV NODE_ENV=production
# dev-dependencies above to save space in the final build
RUN npx tsc --noCheck
CMD [ "node", "dist/index.js" ]
RUN chown -R node:node /app
USER node
CMD ["pm2-runtime", "dist/index.js" ]
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -4,7 +4,7 @@
"scripts": {
"dev": "ts-node src/index.ts",
"build": "npx tsc",
"test": "podman build -t immich-proxy-test . && podman run --init -it -p=3000:3000 immich-proxy-test",
"test": "podman build -t immich-proxy-test .. && podman run --init -it -p=3000:3000 --env-file .env immich-proxy-test",
"start": "node dist/index.js"
},
"author": "Alan Grainger",
File renamed without changes.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
-4
View File
@@ -89,10 +89,6 @@ const toString = (value: unknown) => {
return typeof value === 'string' ? value : ''
}
// Handle process termination requests (e.g. Ctrl+C)
process.on('SIGTERM', () => { process.exit(0) })
process.on('SIGINT', () => { process.exit(0) })
app.listen(3000, () => {
console.log(dayjs().format() + ' Server started')
})
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.