Jump to content

How to host server on Ubuntu using Docker and play on Windows?


gladysjohnso

Recommended Posts


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  0
  • Reputation:   0
  • Joined:  09/24/24
  • Last Seen:  

Hey guys, for a few days now I've been trying to get rathena up and running on my mini PC running Ubuntu. In this server, I host a bunch of Docker services and point domain names to the services via Cloudflared. I'd like to do the same for Ragnarok. I want to build a server image that I could upload to Docker Hub and then create a docker-compose.yml file to pull in whatever images I need. Here's my attempt so far. geometry dash breeze

# Dockerfile
FROM ubuntu:22.04

WORKDIR /rathena
COPY . .

# Install required packages
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install git make libmariadb-dev libmariadbclient-dev-compat gcc g++ zlib1g-dev libpcre3-dev -y

RUN ./configure && \
    make clean && \
    make server

RUN chmod a+x login-server && chmod a+x char-server && chmod a+x map-server && chmod a+x web-server

CMD ["./athena-start", "start"]

I then build the image by running

docker build -t rathena:1.0.0 .

Once I have the server image ready, I use this docker-compose.yml file:

services:
  rathena-db:
    image: mysql:5.7.23
    container_name: rathena-db
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: ${MYSQL_DB:-ragnarok}
      MYSQL_USER: ${MYSQL_USER:-ragnarok}
      MYSQL_PASSWORD: ${MYSQL_PASSWORD:-ragnarok}
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-ragnarok}
    ports:
      - 3306:3306
    healthcheck:
      test: "mysql --user=${MYSQL_USER:-ragnarok} --password=${MYSQL_PASSWORD:-ragnarok} --execute \"USE ragnarok; SHOW TABLES;\""
      interval: 3s
      timeout: 1s
      retries: 5
    volumes:
      - db:/var/lib/mysql
      - ./db-init:/docker-entrypoint-initdb.d
  rathena:
    image: rathena:1.0.0
    container_name: rathena
    ports:
      - 6900:6900
      - 5121:5121
      - 6121:6121
      - 8888:8888
    depends_on:
      rathena-db:
        condition: service_healthy

volumes:
  db:


I can't get it to work though. The server container keeps exiting. And I'm not sure I imported every single SQL file that is needed. The guides aren't that easy to follow honestly and everything is very convoluted. How do I get this to work?

Edited by gladysjohnso
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...