-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: hot server reload & debugging over docker #2718
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
649ff1d
refactor: auth, backend dockerfiles into dev/prod
BlairCurrey e2c6a29
feat: start backend, auth with nodemon
BlairCurrey 1fba772
feat: reload auth, backend on save
BlairCurrey e59e8b5
feat: hot reload of auth/backend
BlairCurrey 9336e1b
feat: add debugger w/ docs
BlairCurrey 6389803
Merge branch 'main' into bc/2650/service-reload-over-docker
BlairCurrey 01d2d09
refactor: rm unecessary EXPOSE from dockerfiles
BlairCurrey 10e8019
fix(ci): use new dockerfile name
BlairCurrey 263e3ce
refactor: edit debugger instructions for clarity
BlairCurrey ae28599
Merge branch 'main' into bc/2650/service-reload-over-docker
BlairCurrey 27e0fff
feat: use debugger on ts files, replace nodemon with ts-node-dev
BlairCurrey 9c58f51
chore: change retry rate, add ts-node transpiler to tsconfig
BlairCurrey 02a5e6b
feat: add debugging instructions to docs
BlairCurrey b9c415c
chore: format
BlairCurrey 07d81a1
Update localenv/README.md
BlairCurrey 66663a9
Update localenv/README.md
BlairCurrey 2de0f80
chore: rm nodemon
BlairCurrey 38ad16e
chore: format
BlairCurrey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -32,13 +32,19 @@ services: | |
image: rafiki-backend | ||
build: | ||
context: ../.. | ||
dockerfile: ./packages/backend/Dockerfile | ||
dockerfile: ./packages/backend/Dockerfile.dev | ||
volumes: | ||
- type: bind | ||
source: ../../packages/backend/src | ||
target: /home/rafiki/packages/backend/src | ||
read_only: true | ||
restart: always | ||
privileged: true | ||
ports: | ||
- '3000:80' | ||
- '3001:3001' | ||
- '3002:3002' | ||
- "9229:9229" | ||
networks: | ||
- rafiki | ||
environment: | ||
|
@@ -73,13 +79,19 @@ services: | |
image: rafiki-auth | ||
build: | ||
context: ../.. | ||
dockerfile: ./packages/auth/Dockerfile | ||
dockerfile: ./packages/auth/Dockerfile.dev | ||
volumes: | ||
- type: bind | ||
source: ../../packages/auth/src | ||
target: /home/rafiki/packages/auth/src | ||
read_only: true | ||
restart: always | ||
networks: | ||
- rafiki | ||
ports: | ||
- '3003:3003' | ||
- '3006:3006' | ||
- "9230:9229" | ||
environment: | ||
NODE_ENV: ${NODE_ENV:-development} | ||
TRUST_PROXY: ${TRUST_PROXY} | ||
|
@@ -112,7 +124,7 @@ services: | |
image: rafiki-frontend | ||
build: | ||
context: ../.. | ||
dockerfile: ./packages/frontend/devDockerfile | ||
dockerfile: ./packages/frontend/Dockerfile.dev | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. went ahead and renamed this for consistency. I went with |
||
volumes: | ||
- type: bind | ||
source: ../../packages/frontend/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
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,24 @@ | ||
FROM node:20-alpine3.18 | ||
|
||
WORKDIR /home/rafiki | ||
|
||
RUN corepack enable | ||
RUN corepack prepare pnpm@8.7.4 --activate | ||
|
||
COPY pnpm-lock.yaml package.json pnpm-workspace.yaml .npmrc tsconfig.json tsconfig.build.json ./ | ||
|
||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ | ||
pnpm fetch \ | ||
| grep -v "cross-device link not permitted\|Falling back to copying packages from store" | ||
|
||
COPY . ./ | ||
|
||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ | ||
pnpm install \ | ||
--recursive \ | ||
--offline \ | ||
--frozen-lockfile | ||
|
||
RUN pnpm --filter auth build:deps | ||
|
||
CMD pnpm --filter auth dev |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM node:20-alpine3.18 | ||
|
||
WORKDIR /home/rafiki | ||
|
||
RUN corepack enable | ||
RUN corepack prepare pnpm@8.7.4 --activate | ||
|
||
COPY pnpm-lock.yaml package.json pnpm-workspace.yaml .npmrc tsconfig.json tsconfig.build.json ./ | ||
|
||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ | ||
pnpm fetch \ | ||
| grep -v "cross-device link not permitted\|Falling back to copying packages from store" | ||
|
||
COPY . ./ | ||
|
||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ | ||
pnpm install \ | ||
--recursive \ | ||
--offline \ | ||
--frozen-lockfile | ||
|
||
RUN pnpm --filter backend build:deps | ||
|
||
CMD pnpm --filter backend dev |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can add a section with the launch.json configuration for VSCode as well?
Also, did you want to keep it just in this readme, or should we also add it to the documentation site?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added the vscode section and added to the documentation site: 02a5e6b