mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-17 06:01:32 +08:00
![Up](/assets/img/avatar_default.png)
* add default values for CLI args * add development docker compose file * prevent crash if userdata dir does not exist * accounts, acccountStats * account stats and create db indices * compensations and daily runs * ensure uniqueness of daily seed * start on port 8001 by default for client parity * add GitHub actions scripts and dockerfile * add os architecture * only build docker image on main repo * add example compose file
30 lines
405 B
Docker
30 lines
405 B
Docker
ARG GO_VERSION=1.22
|
|
|
|
FROM golang:${GO_VERSION} AS builder
|
|
|
|
WORKDIR /src
|
|
|
|
COPY ./go.mod /src/
|
|
COPY ./go.sum /src/
|
|
|
|
RUN go mod download && go mod verify
|
|
|
|
COPY . /src/
|
|
|
|
RUN CGO_ENABLED=0 \
|
|
go build -o rogueserver
|
|
|
|
RUN chmod +x /src/rogueserver
|
|
|
|
# ---------------------------------------------
|
|
|
|
FROM scratch
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /src/rogueserver .
|
|
|
|
EXPOSE 8001
|
|
|
|
ENTRYPOINT ["./rogueserver"]
|