Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/backend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ services:
# Auth Service
auth:
build:
context: ./lambdas/auth
dockerfile: Dockerfile
context: ../..

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think wed want this ./lambdas/auth since wed run this from backend

dockerfile: apps/backend/lambdas/auth/Dockerfile
container_name: branch-auth
restart: unless-stopped
environment:
Expand Down
19 changes: 7 additions & 12 deletions apps/backend/lambdas/auth/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
FROM node:20-alpine

WORKDIR /app

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was the docker file broken without these changes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it couldn't find the shared/types directory when importing @branch/types, as shared is on the same level as apps, so the auth container build was failing locally


# Copy package files
COPY package*.json ./
WORKDIR /shared/types
COPY shared/types/package.json ./
COPY shared/types/ ./

# Install dependencies
RUN npm install

# Copy source files
COPY . .
WORKDIR /app
COPY apps/backend/lambdas/auth/package*.json ./
RUN npm install --no-package-lock
COPY apps/backend/lambdas/auth/ .

# Expose port
EXPOSE 3000

# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/auth/health || exit 1

# Start the dev server
CMD ["npm", "run", "dev"]
Loading
Loading