Files
darkan-docker/Dockerfile.lobby
T
2026-07-30 15:39:42 +01:00

55 lines
1.2 KiB
Docker

# Build stage
FROM eclipse-temurin:17-jdk as builder
# Install dependencies
RUN apt-get update && apt-get install -y \
git \
git-lfs \
gradle \
&& rm -rf /var/lib/apt/lists/*
RUN git lfs install
# Clone repositories
ARG LOBBY_REPO=https://github.com/DarkanRS/lobby-server.git
ARG CACHE_REPO=https://github.com/DarkanRS/cache.git
RUN mkdir -p /darkan && cd /darkan \
&& git clone --depth 1 ${LOBBY_REPO} lobby-server \
&& git clone --depth 1 ${CACHE_REPO} cache
WORKDIR /darkan/lobby-server
# Build the project (adjust based on actual build command)
# Note: Replace with actual build command from the repository
RUN gradle build -x test || true
# Runtime stage
FROM eclipse-temurin:17-jre
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
git \
git-lfs \
&& rm -rf /var/lib/apt/lists/*
RUN git lfs install
# Copy built artifacts from builder
COPY --from=builder /darkan /darkan
WORKDIR /darkan/lobby-server
# Expose ports
EXPOSE 43594 43595 4040
# Set environment variables
ENV MONGO_URL=mongodb
ENV MONGO_PORT=27017
ENV MONGO_USER=dkadmin
ENV MONGO_PASSWORD=changeme
# Start command (adjust based on actual startup script)
# Replace with actual startup command from the repository
CMD ["./start.sh"]