Jump to content
  • 0

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


dokgu

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  07/18/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.

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 .

docker-compose.yml:

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 dokgu
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  08/15/24
  • Last Seen:  

The server container can't seem to stop leaving, I could have overlooked certain necessary SQL file imports.

geometry dash

Link to comment
Share on other sites

  • 0

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

I may have forgotten to import some crucial SQL files, and now the server container won't stop escaping.
slope game

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  6
  • Reputation:   0
  • Joined:  10/14/24
  • Last Seen:  

If the container is failing due to missing or incomplete database initialization, you need to ensure the SQL files for the rAthena database are imported properly.

talking tom gold run

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  319
  • Reputation:   52
  • Joined:  03/30/13
  • Last Seen:  

I successfully set up rAthena in a Docker container! I used an Ubuntu image to create the container, followed the installation guide from the wiki, mapped the necessary ports for the rAthena map, login, and char servers, as well as MySQL. Additionally, I changed the SSH port to something other than 22 for added security.

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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...