Skip to content

Commit

Permalink
chore: update Docker configuration and ignore files
Browse files Browse the repository at this point in the history
- Updated .dockerignore to exclude temporary files, Git directories, and Node modules.
- Modified Dockerfile to copy required modules from the parent directory and build the Go application from the backend directory.
  • Loading branch information
tikazyq committed Dec 20, 2024
1 parent f5631f9 commit 83b81c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ coverage.txt
# Temporary files
*.tmp
*~
**/tmp

# Git directories
.git/

# Node modules
**/node_modules
8 changes: 5 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ FROM golang:1.22.9 AS build

WORKDIR /go/src/app

COPY . .
# Copy all required modules from parent directory
COPY .. .

ENV GO111MODULE on

RUN go install -v ./...
# Build from the backend directory which contains the main.go
RUN cd backend && go install -v ./...

FROM alpine:3.14

# copy files
# Copy the built binary
COPY --from=build /go/bin/crawlab /go/bin/crawlab

0 comments on commit 83b81c8

Please sign in to comment.