Skip to content

Commit ca284f0

Browse files
committed
chore: fix build process and code smells
1 parent 6b8d778 commit ca284f0

12 files changed

Lines changed: 28 additions & 21 deletions

File tree

interapp-backend/bun.lockb

0 Bytes
Binary file not shown.

interapp-backend/dev.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
FROM oven/bun:1.0.14
1+
FROM oven/bun:1.0.15
22
WORKDIR /app
33

44
COPY . .
55

6-
RUN bun install
6+
RUN bun install --frozen-lockfile
7+
ENV NODE_ENV development
78

89
EXPOSE 3000
910
CMD ["bun", "--watch", "api/routes/index.ts"]

interapp-backend/prod.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
FROM oven/bun:1.0.14
1+
FROM oven/bun:1.0.15
22
WORKDIR /app
33

44
COPY . .
5-
RUN bun install
5+
RUN bun install --production --frozen-lockfile
6+
ENV NODE_ENV production
67

78
EXPOSE 3000
89
CMD ["bun", "run", "api/routes/index.ts"]
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
FROM oven/bun:1.0.14
1+
FROM oven/bun:1.0.15
22
WORKDIR /app
33

44
COPY . .
55

6-
RUN bun install
6+
RUN bun install --frozen-lockfile
77

88
RUN apt-get update && apt-get install -y tzdata
99
ENV TZ=Asia/Singapore
10-
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
10+
RUN ln -snf /usr/share/zoneinfo/"$TZ" /etc/localtime && echo "$TZ" > /etc/timezone
11+
RUN apt-get clean
1112

13+
ENV NODE_ENV development
1214
CMD ["bun", "--watch", "scheduler/scheduler.ts"]
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
FROM oven/bun:1.0.14
1+
FROM oven/bun:1.0.15
22
WORKDIR /app
33

44
COPY . .
55

6-
RUN bun install
6+
RUN bun install --production --frozen-lockfile
77

88
RUN apt-get update && apt-get install -y tzdata
99
ENV TZ=Asia/Singapore
10-
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
11-
10+
RUN ln -snf /usr/share/zoneinfo/"$TZ" /etc/localtime && echo "$TZ" > /etc/timezone
11+
RUN apt-get clean
1212

13+
ENV NODE_ENV production
1314
CMD ["bun", "run", "scheduler/scheduler.ts"]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM oven/bun:1.0.14
1+
FROM oven/bun:1.0.15
22
WORKDIR /app
33

44
COPY . .
55

6-
RUN bun install
6+
RUN bun install --frozen-lockfile
77

88
EXPOSE 1234
99
CMD ["bun", "run", "api/routes/index.ts"]

interapp-backend/tests/unit/auth.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('Unit (auth)', () => {
4646
email: 'dskjfklsjf@jfndcdfs',
4747
verified: false,
4848
service_hours: 0,
49-
permissions: expect.any(Array<Number>),
49+
permissions: expect.any(Array<number>),
5050
},
5151
});
5252
});

interapp-backend/tests/unit/service.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import { UserModel } from '@models/user';
21
import { AuthModel } from '@models/auth';
32
import { ServiceModel } from '@models/service';
43
import { describe, expect, test, afterAll, beforeAll } from 'bun:test';
54
import { recreateDB } from '../utils/recreate_db';
6-
import appDataSource from '@utils/init_datasource';
75
import { AttendanceStatus } from '@db/entities';
86

97
describe('Unit (service)', () => {

interapp-frontend/bun.lockb

428 Bytes
Binary file not shown.

interapp-frontend/dev.Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
FROM oven/bun:1.0.14
1+
FROM oven/bun:1.0.15
22
WORKDIR /app
33

44
COPY . .
55

6-
RUN bun install
6+
ENV NODE_ENV development
7+
RUN bun install --frozen-lockfile
8+
79

810
EXPOSE 3000
911
CMD ["bun", "run", "dev"]

0 commit comments

Comments
 (0)