-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be0669e
commit 09e050b
Showing
6 changed files
with
79 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM golang:alpine AS builder | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
COPY ./go.mod ./go.sum ./ | ||
|
||
RUN go mod download && go mod tidy | ||
|
||
COPY ./ ./ | ||
|
||
RUN go build -o main ./cmd/api | ||
|
||
# Run stage | ||
FROM alpine | ||
WORKDIR /app | ||
COPY --from=builder /app/main . | ||
CMD [ "/app/main" ] |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
How to use | ||
1. Install docker | ||
2. go to the directory which has the Dockerfile in it (spotify collab backend) | ||
3. run `docker compose up -d` [-d for detached mode] | ||
4. Let everything build and run `docker compose ps` to confirm its running (you should see both psql and api) | ||
5. Send requests on 127.0.0.1:8080 | ||
6. Check [routes](.\internal\server\routes.go) folder for the routes |
This file contains 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
This file contains 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
This file contains 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