forked from flohansen/hsfl-master-ai-cloud-engineering
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docker): add Dockerfiles for services
- Loading branch information
Showing
5 changed files
with
61 additions
and
0 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,10 @@ | ||
FROM golang:1.21-alpine | ||
|
||
WORKDIR /app | ||
COPY ./src/http-proxy-service ./src/http-proxy-service | ||
|
||
WORKDIR /app/src/http-proxy-service | ||
RUN go build -o ./main | ||
|
||
EXPOSE 8080 | ||
CMD ["/app/src/http-proxy-service/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM golang:1.21-alpine | ||
|
||
WORKDIR /app | ||
COPY ./lib ./lib | ||
COPY ./src/product-service ./src/product-service | ||
|
||
WORKDIR /app/src/product-service | ||
RUN go mod tidy | ||
RUN go build -o ./main | ||
|
||
EXPOSE 3003 | ||
CMD ["/app/src/product-service/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM golang:1.21-alpine | ||
|
||
WORKDIR /app | ||
COPY ./lib ./lib | ||
COPY ./src/shoppinglist-service ./src/shoppinglist-service | ||
|
||
WORKDIR /app/src/shoppinglist-service | ||
RUN go mod tidy | ||
RUN go build -o ./main | ||
|
||
EXPOSE 3002 | ||
CMD ["/app/src/shoppinglist-service/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM golang:1.21-alpine | ||
|
||
WORKDIR /app | ||
COPY ./lib ./lib | ||
COPY ./src/user-service ./src/user-service | ||
|
||
WORKDIR /app/src/user-service | ||
RUN go mod tidy | ||
RUN go build -o ./main | ||
|
||
EXPOSE 3003 | ||
CMD ["/app/src/user-service/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM golang:1.21-alpine | ||
RUN apk add --update nodejs npm | ||
|
||
WORKDIR /app | ||
COPY ./src/web-service ./src/web-service | ||
|
||
WORKDIR /app/src/web-service/frontend | ||
RUN npm ci | ||
RUN npm run build | ||
|
||
WORKDIR /app/src/web-service | ||
RUN go build -o ./main | ||
|
||
EXPOSE 3000 | ||
CMD ["/app/src/web-service/main"] |