Production-ready Docker Compose setup: env handling, volumes, and documentation#23
Open
adarshdotdev wants to merge 2 commits intoDyan-Dev:mainfrom
Open
Production-ready Docker Compose setup: env handling, volumes, and documentation#23adarshdotdev wants to merge 2 commits intoDyan-Dev:mainfrom
adarshdotdev wants to merge 2 commits intoDyan-Dev:mainfrom
Conversation
g3Bg2
requested changes
Jul 21, 2025
| ports: | ||
| - "3000:3000" | ||
| environment: | ||
| - JWT_SECRET=${JWT_SECRET} |
Contributor
There was a problem hiding this comment.
In the future, we will add more environment variables, so we will need to use the .env file.
| ports: | ||
| - "5173:80" | ||
| environment: | ||
| - VITE_API_URL=${VITE_API_URL} |
Contributor
There was a problem hiding this comment.
In the future, we will add more environment variables, so we will need to use the .env file to pass the values
| @@ -0,0 +1 @@ | |||
| JWT_SECRET="YOUR_SECRET" No newline at end of file | |||
Contributor
There was a problem hiding this comment.
We need only a single .env file in the root, both for the frontend and the backend.
| @@ -0,0 +1 @@ | |||
| VITE_API_URL="http://localhost:3000" No newline at end of file | |||
Contributor
There was a problem hiding this comment.
We need only a single .env file in the root, both for the frontend and the backend.
g3Bg2
reviewed
Jul 21, 2025
| // Generate the magic link (modify sendMagicLink to return the link) | ||
| // const magicLink = await this.authService.sendMagicLink(email); | ||
| const mockMode = process.env.MOCK_EMAIL_ENABLED === 'true'; | ||
| const magicLink = await this.authService.sendMagicLink(email, mockMode); |
Contributor
There was a problem hiding this comment.
sendMagicLink(email, mockMode) only accepts email as an argument You did not implement the sendmagicLink funtion
Contributor
|
Are you testing this before raising the PR? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Key Changes
Add
.dockerignorenode_modules,.env,dist,.git, logs) from being copied into Docker images, resulting in smaller, faster builds.Refactor Frontend for Configurable Backend URL
VITE_API_URLenvironment variable instead of hardcodinglocalhost.Remove
COPY .envfrom Dockerfiles.envfiles into images.Pass Backend Environment Variables via Docker Compose
JWT_SECRETandBACKEND_PORTvia Compose, not baked into the image..envfiles provided for both frontend and backend.Persist SQLite Database with Docker Volume
sqlite-data) to persist the SQLite database, ensuring data is not lost on container restarts.Update
README.mdwith Production Deployment Instructions.envis used by Compose for variable substitution and is not copied into images.Closes #2