Skip to content
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

Fix missing build info for the API #346

Merged
merged 2 commits into from
Jan 10, 2024
Merged
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
7 changes: 4 additions & 3 deletions API/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ WORKDIR /home

RUN apt install git

COPY go.mod go.sum /home/
COPY API/go.mod API/go.sum /home/
RUN go mod download

COPY . .git* /home/
COPY API/ /home/
COPY .git /home/

#Build
RUN --mount=type=cache,target=/root/.cache/go-build \
Expand All @@ -20,6 +21,6 @@ FROM busybox:latest
USER root
WORKDIR /home

COPY resources/test/ /home/resources/test/
COPY API/resources/test/ /home/resources/test/
COPY --from=builder /home/main /home
ENTRYPOINT [ "/home/main" ]
5 changes: 4 additions & 1 deletion deploy/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ version: '3.9'
services:
ogree_api:
build:
context: ${CORE_DIR}/${API_BUILD_DIR}
context: ${CORE_DIR}
dockerfile: ${API_BUILD_DIR}/Dockerfile
args:
BUILDKIT_CONTEXT_KEEP_GIT_DIR: true
image: ogree/api:${IMAGE_TAG}
container_name: ${COMPOSE_PROJECT_NAME}_api
environment:
Expand Down
Loading