forked from openimsdk/open-im-server
-
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.
Merge remote-tracking branch 'origin/3.6.1-code-conventions' into 3.6…
….1-code-conventions
- Loading branch information
Showing
4 changed files
with
27 additions
and
8 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
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ COPY . . | |
RUN go mod download | ||
|
||
# Install Mage to use for building the application | ||
RUN go install github.com/magefile/mage@latest | ||
RUN go install github.com/magefile/mage@v1.15.0 | ||
|
||
# Optionally build your application if needed | ||
RUN mage build | ||
|
@@ -31,6 +31,7 @@ RUN apk add --no-cache bash | |
ENV SERVER_DIR=/openim-server | ||
WORKDIR $SERVER_DIR | ||
|
||
|
||
# Copy the compiled binaries and mage from the builder image to the final image | ||
COPY --from=builder $SERVER_DIR/_output $SERVER_DIR/_output | ||
COPY --from=builder $SERVER_DIR/config $SERVER_DIR/config | ||
|
@@ -42,8 +43,7 @@ COPY --from=builder $SERVER_DIR/start-config.yml $SERVER_DIR/ | |
COPY --from=builder $SERVER_DIR/go.mod $SERVER_DIR/ | ||
COPY --from=builder $SERVER_DIR/go.sum $SERVER_DIR/ | ||
|
||
# Set up volume mounts for the configuration directory and logs directory | ||
VOLUME ["$SERVER_DIR/config", "$SERVER_DIR/_output/logs"] | ||
RUN go get github.com/openimsdk/[email protected] | ||
|
||
# Set the command to run when the container starts | ||
ENTRYPOINT ["sh", "-c", "mage start"] | ||
ENTRYPOINT ["sh", "-c", "mage start && tail -f /dev/null"] |
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