7 Commits

Author SHA1 Message Date
8e0475c8a7 build arm64 image
Some checks failed
continuous-integration/drone/tag Build is failing
2025-11-29 21:18:54 +05:30
1359a75214 allow games.aetoskia.com
All checks were successful
continuous-integration/drone/tag Build is passing
2025-11-29 19:41:33 +05:30
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
2 changed files with 15 additions and 15 deletions

View File

@@ -69,11 +69,17 @@ steps:
commands:
- IMAGE_TAG=$(cat /drone/src/LATEST_TAG.txt | tr -d '\n')
- echo "🔨 Building Nakama image lila-games/nakama-server:$IMAGE_TAG"
# Enable buildx
- docker buildx create --use
# Build for ARM64
- |
docker build \
docker buildx build \
--platform linux/arm64 \
--network=host \
-t lila-games/nakama-server:$IMAGE_TAG \
-t lila-games/nakama-server:latest \
--push \
/drone/src
# -----------------------------------------------------

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 apk add --no-cache git build-base
RUN apt-get update && apt-get install -y \
build-essential \
git
WORKDIR /workspace
# Download module deps first (better caching)
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build plugin
RUN mkdir -p build && \
CGO_ENABLED=1 go build \
--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 --from=plugin_builder /workspace/build/main.so /nakama/data/modules/main.so
# Default Nakama startup (runs migrations + server)
ENTRYPOINT [
"/bin/sh", "-ecx", "\
/nakama/nakama migrate up --database.address \"$DB_ADDR\" && \
exec /nakama/nakama --database.address \"$DB_ADDR\" --socket.server_key=\"$SERVER_KEY\""
]
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\" --http.cors=allow_origin:https://games.aetoskia.com"