Skip to content

Commit 6c9d82d

Browse files
authored
feat: added seed dockerfile (#1203)
* feat: added seed dockerfile Signed-off-by: Sahil Kamble <[email protected]> * feat: updated seed dockerfile Signed-off-by: Sahil Kamble <[email protected]> --------- Signed-off-by: Sahil Kamble <[email protected]>
1 parent ffeb704 commit 6c9d82d

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/continuous-delivery.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
- utility
3030
- verification
3131
- webhook
32+
- organization
33+
- seed
3234

3335
permissions:
3436
contents: read

Dockerfiles/Dockerfile.seed

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:18 as build
2+
3+
# Install pnpm
4+
RUN npm install -g pnpm
5+
6+
# Install PostgreSQL client (use apt for Debian-based images)
7+
RUN apt-get update && apt-get install -y postgresql-client
8+
9+
# Set working directory
10+
WORKDIR /app
11+
12+
COPY . .
13+
14+
RUN pnpm i --ignore-scripts
15+
16+
# Run Prisma commands
17+
RUN cd libs/prisma-service && npx prisma generate
18+
19+
# Set the command to run the microservice
20+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && npx prisma db seed"]

0 commit comments

Comments
 (0)