-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #196 from google/gorrila/sample
working sample application
- Loading branch information
Showing
8 changed files
with
50 additions
and
71 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 |
---|---|---|
@@ -1,28 +1,19 @@ | ||
# Build Stage | ||
# First pull Golang image | ||
FROM golang:1.19-alpine as build-env | ||
FROM golang:1.19-alpine | ||
|
||
ENV APP_NAME sqlcommenter-http | ||
ENV CMD_PATH main.go | ||
|
||
# Copy application data into image | ||
COPY . $GOPATH/src/$APP_NAME | ||
|
||
# Set workdir | ||
WORKDIR $GOPATH/src/$APP_NAME | ||
|
||
# Copy application data into image | ||
COPY . . | ||
|
||
# Budild application | ||
RUN CGO_ENABLED=0 go build -v -o /$APP_NAME $GOPATH/src/$APP_NAME/$CMD_PATH | ||
|
||
# Run Stage | ||
FROM alpine:3.16.3 | ||
|
||
# Set environment variable | ||
ENV APP_NAME sqlcommenter-http | ||
|
||
# Copy only required data into this image | ||
COPY --from=build-env /$APP_NAME . | ||
RUN CGO_ENABLED=0 go build -v | ||
|
||
# Expose application port | ||
EXPOSE 8081 | ||
|
||
# Start app | ||
CMD ["./sqlcommenter-http", "--db_engine=mysql"] | ||
CMD ["./sqlcommenter-http", "--db_engine=pg"] |
This file was deleted.
Oops, something went wrong.
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
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