File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,8 @@ npm run db:prod:migrate
6
6
# Checks admin table and will not seed if data exists
7
7
npm run db:prod:seed
8
8
9
+ rm -rf drizzle src tsconfig.json
10
+
11
+ npm uninstall tsx drizzle-kit
12
+
9
13
npm run start
Original file line number Diff line number Diff line change @@ -9,9 +9,18 @@ RUN npm run build
9
9
FROM node:lts-alpine AS production
10
10
WORKDIR /data/user-express
11
11
COPY --from=build /data/user-express/package*.json ./
12
- RUN npm ci --omit=dev
13
12
COPY --from=build --chown=node:node /data/user-express/dist ./dist
14
13
14
+ RUN npm ci --omit=dev
15
+ # For migration
16
+ RUN npm install tsx drizzle-kit
17
+ COPY drizzle ./drizzle
18
+ COPY src/lib/db/ ./src/lib/db
19
+ COPY src/lib/passwords ./src/lib/passwords
20
+ COPY src/config.ts ./src
21
+ COPY tsconfig.json .
22
+ COPY entrypoint.sh .
23
+
15
24
ARG port
16
25
EXPOSE ${port}
17
26
CMD [ "npm" , "run" , "start" ]
Original file line number Diff line number Diff line change @@ -70,8 +70,8 @@ services:
70
70
container_name : " user-express"
71
71
build :
72
72
context : ./backend/user
73
- dockerfile : ./ express.Dockerfile
74
- target : build
73
+ dockerfile : express.Dockerfile
74
+ target : production
75
75
args :
76
76
# For building with the correct env vars
77
77
- env=${USER_EXPRESS_ENV}
@@ -92,6 +92,12 @@ services:
92
92
- user-db-network
93
93
- user-api-network
94
94
entrypoint : ["/bin/sh", "entrypoint.sh"]
95
+ healthcheck :
96
+ test : wget --no-verbose --tries=1 --spider http://localhost:9001/health || exit 1
97
+ interval : 30s
98
+ timeout : 10s
99
+ retries : 5
100
+ start_period : 5s
95
101
96
102
volumes :
97
103
# Persistent Volumes for Databases
You can’t perform that action at this time.
0 commit comments