-
Notifications
You must be signed in to change notification settings - Fork 2
Auth0 login feature #52
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,19 +7,24 @@ RUN corepack use pnpm@* | |
| ARG WORKDIR=/chatbot_server | ||
| WORKDIR ${WORKDIR} | ||
|
|
||
| # Adding package.json first will cache our dependencies so | ||
| # that they do not have to be re-installed when the image rebuilds | ||
| # Add only package files for caching dependencies | ||
| ADD package.json ${WORKDIR} | ||
| ADD pnpm-lock.yaml ${WORKDIR} | ||
| ADD scripts/ /chatbot_server/scripts/ | ||
|
|
||
| # Install dependencies (with fallback) | ||
| # Install dependencies | ||
| RUN pnpm install | ||
|
|
||
| # Now copy the rest of the source files (including scripts/) | ||
| COPY . . | ||
|
|
||
| # Now chmod scripts - scripts/ exists now | ||
| RUN chmod +x ./scripts/*.sh || true | ||
|
|
||
| # Set up git | ||
| RUN apk add git | ||
| ADD git-config.txt ${WORKDIR} | ||
|
|
||
| EXPOSE 7000 | ||
| EXPOSE 7000 | ||
|
|
||
| CMD ['node', 'index.js'] | ||
|
Collaborator
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. Not sure if we need to line 30 to successfully run |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ services: | |
| condition: service_healthy | ||
|
|
||
| chatbot_db: | ||
| hostname: postgres # Explicit hostname | ||
| hostname: localhost # Explicit hostname | ||
|
Collaborator
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. How did changing this value affect the changes?
Collaborator
Author
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. During local testing, services failed to connect to the database under the hostname postgres. Setting localhost resolved the issue locally, since it was my signup/in name in my admin profile. This change may not be required if your networking is different, so I’m open to reverting or making it environment-specific (via .env or profiles). |
||
| image: postgres:15-alpine | ||
| container_name: chatbot_db | ||
| ports: | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
I'm not sure this line is needed.
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.
Reason: This allows shell scripts like start.sh and rebuild.sh to be included in the image, which are used during container setup.
Why it's needed: These scripts were referenced in the compose file and are required for container startup/refresh. Without adding them explicitly, containerized rebuild or start scripts would fail if not included by COPY/ADD.