5 Commits

Author SHA1 Message Date
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

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,12 +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 exec /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"