Skip to content

Commit c2701c8

Browse files
committed
feat: upgrade compose-file-loader to typescript
1 parent 50c8f48 commit c2701c8

12 files changed

Lines changed: 2210 additions & 218 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.gitignore
22
node_modules/
33
README.md
4+
Dockerfile

src/compose-file-loader/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules/
22
test.txt
33
data/
4+
dist/
5+
.parcel-cache/

src/compose-file-loader/Dockerfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
FROM node:20-alpine
2-
LABEL maintainer="Joschua Becker EDV <support@scolasti.co>"
1+
FROM node:24-alpine AS build
2+
RUN npm install -g pnpm
33

44
WORKDIR /app
55
COPY . /app
6+
RUN pnpm install
7+
RUN pnpm build
68

9+
FROM node:24-alpine AS production
10+
LABEL maintainer="Joschua Becker EDV <support@scolasti.co>"
711
RUN apk add --no-cache unzip tar
812

13+
WORKDIR /app
14+
COPY --from=build /app/dist /app/dist
15+
916
ENV NODE_ENV=production
1017
ENV SLEEP_AFTER=10000
11-
CMD ["node", "index.js"]
18+
CMD ["node", "dist/main.js"]
19+
# CMD ["ls", "-la", "src"]

src/compose-file-loader/index.js

Lines changed: 0 additions & 213 deletions
This file was deleted.
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
{
2+
"source": "src/main.ts",
3+
"main": "dist/main.js",
24
"scripts": {
3-
"start": "node index.js",
4-
"dev": "FILE_TEST_PATH=./test.txt FILE_TEST_CONTENT=Hello FILE_TEST_DELETE_PATH=./test.txt FILE_TEST_DELETE_MODE=delete ORDER=TEST_DELETE,TEST SLEEP_AFTER=0 node index.js"
5+
"start": "node dist/main.js",
6+
"dev": "FILE_TEST_PATH=./test.txt FILE_TEST_CONTENT=Hello FILE_TEST_DELETE_PATH=./test.txt FILE_TEST_DELETE_MODE=delete ORDER=TEST_DELETE,TEST SLEEP_AFTER=0 node dist/main.js",
7+
"build": "parcel build"
8+
},
9+
"devDependencies": {
10+
"@types/node": "^24.2.1",
11+
"parcel": "^2.15.4"
512
}
613
}

0 commit comments

Comments
 (0)