mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-10 00:22:23 +08:00
refactor
This commit is contained in:
parent
ac94ede57f
commit
daa563171b
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
# Ignore build artifacts
|
# Ignore build artifacts
|
||||||
logs/
|
logs/
|
||||||
|
_output/
|
||||||
# Ignore non-essential documentation
|
# Ignore non-essential documentation
|
||||||
README.md
|
README.md
|
||||||
README-zh_CN.md
|
README-zh_CN.md
|
||||||
|
|||||||
@ -16,7 +16,7 @@ COPY . .
|
|||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
# Install Mage to use for building the application
|
# 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
|
# Optionally build your application if needed
|
||||||
RUN mage build
|
RUN mage build
|
||||||
@ -31,6 +31,7 @@ RUN apk add --no-cache bash
|
|||||||
ENV SERVER_DIR=/openim-server
|
ENV SERVER_DIR=/openim-server
|
||||||
WORKDIR $SERVER_DIR
|
WORKDIR $SERVER_DIR
|
||||||
|
|
||||||
|
|
||||||
# Copy the compiled binaries and mage from the builder image to the final image
|
# 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/_output $SERVER_DIR/_output
|
||||||
COPY --from=builder $SERVER_DIR/config $SERVER_DIR/config
|
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.mod $SERVER_DIR/
|
||||||
COPY --from=builder $SERVER_DIR/go.sum $SERVER_DIR/
|
COPY --from=builder $SERVER_DIR/go.sum $SERVER_DIR/
|
||||||
|
|
||||||
# Set up volume mounts for the configuration directory and logs directory
|
RUN go get github.com/openimsdk/gomake@v0.0.9-alpha.3
|
||||||
VOLUME ["$SERVER_DIR/config", "$SERVER_DIR/_output/logs"]
|
|
||||||
|
|
||||||
# Set the command to run when the container starts
|
# Set the command to run when the container starts
|
||||||
ENTRYPOINT ["sh", "-c", "mage start"]
|
ENTRYPOINT ["sh", "-c", "mage start && tail -f /dev/null"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user