Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MTA:SA Server - Docker Infrastructure

This documentation covers the DevOps architecture and technologies used to deploy the Multi Theft Auto: San Andreas server in a containerized environment.


๐Ÿ› ๏ธ Technologies Used

  • Docker: Used to containerize the server, ensuring that the application runs identically regardless of the host machine's configuration.
  • Docker Compose: Acts as the orchestrator to manage the service, networking, and volume mapping in a single configuration file.
  • Ubuntu 22.04 (LTS): The lightweight base image used inside the container to provide a stable Linux environment.
  • Infrastructure as Code (IaC): The entire server environment is defined by code (Dockerfile and docker-compose.yml), making it easy to replicate or migrate.

๐Ÿ“‚ Architecture Overview

1. Environment Isolation (The Dockerfile)

Instead of installing dependencies directly on the VPS, we use a custom Dockerfile. It handles the installation of specific Linux libraries required by the MTA binary (libreadline8, libncursesw6, and libsqlite3-0), keeping the host OS clean.

2. Service Orchestration (The Docker Compose)

The docker-compose.yml file manages the container lifecycle. It defines:

  • Port Mapping: Routes external traffic (UDP 22003, 22126 and TCP 22005) into the container.
  • Restart Policy: Configured to always, ensuring the server automatically restarts if the process crashes or the VPS reboots.
  • Detached Execution: Replaces the need for screen or tmux by running the server as a background system daemon.

3. Data Persistence (Volumes)

We utilize Docker Volumes to map the host's physical directory (mods/) to the containerโ€™s internal path. This architecture allows for real-time script editing and ensures that all game data, logs, and internal databases are persisted even if the container is destroyed.


๐Ÿ“‹ System Prerequisites

  • Host OS: Linux (Ubuntu/Debian recommended).
  • Runtime: Docker Engine 24.0+ & Docker Compose V2.

Status: โœ… Production Ready

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages