-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9daa913
commit 6cd5a33
Showing
10 changed files
with
83 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,42 @@ | ||
# name: github-actions | ||
name: github-actions | ||
|
||
# on: [push] | ||
on: [push] | ||
|
||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
# strategy: | ||
# matrix: | ||
# node-version: [20.10.0] | ||
# os: [ubuntu-latest] | ||
strategy: | ||
matrix: | ||
node-version: [20.10.0] | ||
os: [ubuntu-latest] | ||
|
||
# steps: | ||
# - name: Git Checkout | ||
# uses: actions/checkout@v4 | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# - name: Setup Node env | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} | ||
# cache: 'yarn' | ||
- name: Setup Node env | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
|
||
# - name: Install dependencies | ||
# run: yarn | ||
- name: Install dependencies | ||
run: yarn | ||
|
||
# - name: Build @core/lib | ||
# run: yarn lib:build | ||
- name: Build @core/lib | ||
run: yarn lib:build | ||
|
||
# - name: Build frontend | ||
# run: yarn frontend:build | ||
- name: Build express-server | ||
run: yarn workspace express-server build | ||
|
||
# - name: Build fastify-server | ||
# run: yarn fastify-server:build | ||
- name: Build nestjs-server | ||
run: yarn workspace nestjs-server build | ||
|
||
- name: Build frontend | ||
run: yarn workspace frontend build | ||
|
||
- name: Build next-client | ||
run: yarn workspace next-client build | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PORT= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Base Image | ||
FROM node:17-alpine3.14 as phase1 | ||
FROM node:20-alpine3.18 as phase1 | ||
|
||
WORKDIR /app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
# Base Image | ||
FROM node:17-alpine3.14 as phase1 | ||
FROM node:20-alpine3.18 as phase1 | ||
|
||
WORKDIR /app | ||
|
||
# Can't use these stmt as husky doesnt get installed & unable to | ||
# create directories | ||
# ENV NODE_ENV production | ||
# USER node | ||
|
||
# first create these directories, else the copying won't work. | ||
RUN mkdir -p apps/fastify-server | ||
|
||
# Run yarn only if package.json changes | ||
# copied tsconfig as nestjs-server's tsconfig extends rootDir's tsconfig | ||
COPY --chown=node:node turbo.json . | ||
COPY --chown=node:node tsconfig.json . | ||
COPY --chown=node:node package.json . | ||
|
||
# first create these directories, else the copying won't work. | ||
RUN mkdir -p apps/nestjs-server | ||
|
||
# copying only the required packages | ||
COPY --chown=node:node ./apps/fastify-server/package.json apps/fastify-server | ||
COPY --chown=node:node ./apps/fastify-server apps/fastify-server | ||
COPY --chown=node:node ./apps/nestjs-server/package.json apps/nestjs-server | ||
COPY --chown=node:node ./apps/nestjs-server apps/nestjs-server | ||
|
||
# install node_modules | ||
RUN npm install | ||
RUN yarn | ||
|
||
# build fastify-server | ||
RUN yarn fastify-server:build | ||
# build nestjs-server | ||
RUN yarn build | ||
|
||
# run the build | ||
CMD ["node", "apps/fastify-server/dist/main.js"] | ||
# run server in dev env | ||
CMD ["yarn", "workspace", "nestjs-server", "start:prod"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,5 @@ async function bootstrap() { | |
); | ||
await app.listen(4000); | ||
} | ||
|
||
bootstrap(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters