6 Commits

Author SHA1 Message Date
6786547950 enabled tag based deployment
All checks were successful
continuous-integration/drone/tag Build is passing
2025-11-29 19:06:11 +05:30
17a2caea49 fixes
Some checks failed
continuous-integration/drone Build is failing
2025-11-29 19:02:01 +05:30
8ff199ca10 fixes
Some checks failed
continuous-integration/drone Build is failing
2025-11-29 18:59:02 +05:30
62c1f3920b fixes
Some checks failed
continuous-integration/drone/tag Build is failing
2025-11-29 18:42:41 +05:30
73e3f0a7ac fixes
Some checks failed
continuous-integration/drone/tag Build is failing
2025-11-29 18:38:13 +05:30
21f6698b89 fixes
Some checks failed
continuous-integration/drone/tag Build is failing
2025-11-29 18:33:15 +05:30
2 changed files with 9 additions and 15 deletions

View File

@@ -68,7 +68,7 @@ steps:
path: /var/run/docker.sock path: /var/run/docker.sock
commands: commands:
- IMAGE_TAG=$(cat /drone/src/LATEST_TAG.txt | tr -d '\n') - IMAGE_TAG=$(cat /drone/src/LATEST_TAG.txt | tr -d '\n')
- echo "🔨 Building Nakama image: lila-games/nakama-server:$IMAGE_TAG" - echo "🔨 Building Nakama image lila-games/nakama-server:$IMAGE_TAG"
- | - |
docker build \ docker build \
--network=host \ --network=host \

View File

@@ -1,21 +1,19 @@
# ----------------------------------------------------- # -----------------------------------------------------
# 1. Build the Nakama plugin (ARM64) # 1. Build the Nakama plugin
# ----------------------------------------------------- # -----------------------------------------------------
FROM golang:1.22-alpine AS plugin_builder FROM golang:1.22 AS plugin_builder
# Install dependencies needed for CGO plugin build RUN apt-get update && apt-get install -y \
RUN apk add --no-cache git build-base build-essential \
git
WORKDIR /workspace WORKDIR /workspace
# Download module deps first (better caching)
COPY go.mod go.sum ./ COPY go.mod go.sum ./
RUN go mod download RUN go mod download
# Copy source code
COPY . . COPY . .
# Build plugin
RUN mkdir -p build && \ RUN mkdir -p build && \
CGO_ENABLED=1 go build \ CGO_ENABLED=1 go build \
--trimpath \ --trimpath \
@@ -25,16 +23,12 @@ RUN mkdir -p build && \
# ----------------------------------------------------- # -----------------------------------------------------
# 2. Build final Nakama image (ARM64) # 2. Build final Nakama image
# ----------------------------------------------------- # -----------------------------------------------------
FROM --platform=linux/arm64 heroiclabs/nakama:3.21.0 AS nakama FROM heroiclabs/nakama:3.21.0 AS nakama
# Copy plugin from builder stage # Copy plugin from builder stage
COPY --from=plugin_builder /workspace/build/main.so /nakama/data/modules/main.so COPY --from=plugin_builder /workspace/build/main.so /nakama/data/modules/main.so
# Default Nakama startup (runs migrations + server) # Default Nakama startup (runs migrations + server)
ENTRYPOINT [ ENTRYPOINT exec /bin/sh -ecx "/nakama/nakama migrate up --database.address \"$DB_ADDR\" && exec /nakama/nakama --database.address \"$DB_ADDR\" --socket.server_key=\"$SERVER_KEY\""
"/bin/sh", "-ecx", "\
/nakama/nakama migrate up --database.address \"$DB_ADDR\" && \
exec /nakama/nakama --database.address \"$DB_ADDR\" --socket.server_key=\"$SERVER_KEY\""
]