update readme
This commit is contained in:
		
							parent
							
								
									b4dbd725e2
								
							
						
					
					
						commit
						3459b71c8e
					
				
							
								
								
									
										42
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								README.md
									
									
									
									
									
								
							| @ -1,5 +1,7 @@ | |||||||
| # wow private server | # wow private server | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | 
 | ||||||
| ## Pre requis | ## Pre requis | ||||||
| 
 | 
 | ||||||
| - Linux 🐧 | - Linux 🐧 | ||||||
| @ -12,33 +14,61 @@ | |||||||
| |--------------------------------------------|--------------|-----------|-------------------| | |--------------------------------------------|--------------|-----------|-------------------| | ||||||
| |             World of Warcraft®             |  **v1.12.x** | `classic` | https://archive.org/download/World_of_Warcraft_Client_and_Installation_Archive/ISO/WoW-1.12.1_install.rar | | |             World of Warcraft®             |  **v1.12.x** | `classic` | https://archive.org/download/World_of_Warcraft_Client_and_Installation_Archive/ISO/WoW-1.12.1_install.rar | | ||||||
| |   World of Warcraft: The Burning Crusade®  |  **v2.4.3**  |   `tbc`   | https://archive.org/download/World_of_Warcraft_Client_and_Installation_Archive/ISO/WoW-2.4.3_install.rar | | |   World of Warcraft: The Burning Crusade®  |  **v2.4.3**  |   `tbc`   | https://archive.org/download/World_of_Warcraft_Client_and_Installation_Archive/ISO/WoW-2.4.3_install.rar | | ||||||
| | World of Warcraft: Wrath of the Link King® |  **v3.3.5a** |  `wotlk`  |                   | | | World of Warcraft: Wrath of the Link King® |  **v3.3.5a** |  `wotlk`  | somewher in the web ;) | | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| ## Configuration | ## Configuration | ||||||
| 
 | 
 | ||||||
| - Renseigner dans le fichier `.env` : | - Renseigner dans le fichier `.env` : | ||||||
|     - Le chemin absolue vers le client WOW (Classic, tbc ou wotlk) |     - Le chemin absolue vers le client WOW (Classic, tbc ou wotlk) | ||||||
|     - La version de WOW correspondante au client |     - La version de WOW correspondante au client () | ||||||
|  |     - La TimeZone (TZ) | ||||||
|  |     - Mots de passe database | ||||||
| 
 | 
 | ||||||
| ## Installation | ## Installation | ||||||
| 
 | 
 | ||||||
| - Extraire les maps du client: | ### Extraire les maps du client  | ||||||
| ```bash | ```bash | ||||||
| ./builder/run.sh extract | ./docker/run.sh extract | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| > Choisir l'import en HD avec le plus de CPU possible car c'est long ☕ | > Choisir l'import en HD avec le plus de CPU possible car c'est long ☕ | ||||||
| 
 | 
 | ||||||
|  | ### Builder les images | ||||||
|  | 
 | ||||||
|  | ```bash | ||||||
|  | ./build_docker_image.sh wotlk 2 | ||||||
|  | #                    version / nb threads | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | > L'image builder récupère le code source de cmangos pour le compiler, c'est long aussi ☕ | ||||||
|  | 
 | ||||||
|  | ### Peupler la base de données | ||||||
|  | 
 | ||||||
| - Lançer la base de données: | - Lançer la base de données: | ||||||
| ```bash | ```bash | ||||||
| docker compose up wow-db | docker compose up database | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | > Laisser tourner et ouvrir un autre terminal | ||||||
|  | 
 | ||||||
| - Dans un autre terminal, lançer le script d'import des données du jeu: | - Dans un autre terminal, lançer le script d'import des données du jeu: | ||||||
| ```bash | ```bash | ||||||
| ./builder/run.sh init-db | ./docker/run.sh init-db | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| > Patienter le temps de la mise en place de la base de données ☕ | > Patienter le temps de la mise en place de la base de données ☕ | ||||||
| 
 | 
 | ||||||
|  | ### Création du Realm | ||||||
|  | 
 | ||||||
|  | ```bash | ||||||
|  | docker exec  <wow-mangosd>  | ||||||
|  | 
 | ||||||
|  | # delete realm par défaut | ||||||
|  | DELETE FROM realmlist WHERE id = 1; | ||||||
|  | # Créer son realm | ||||||
|  | INSERT INTO realmlist (id, name, address, port, icon, realmflags, timezone, allowedSecurityLevel) | ||||||
|  |     VALUES ('1', 'NOM', '127.0.0.1', '8085', '1', '0', '1', '0'); | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | > Modifier le `NOM`, l'adresse `IP` du serveur (sauf si sur la même machine que le client) et la timezone si différent de Paris | ||||||
|  | |||||||
							
								
								
									
										60
									
								
								build_docker_images.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										60
									
								
								build_docker_images.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,60 @@ | |||||||
|  | #!/usr/bin/env bash | ||||||
|  | set -euo pipefail | ||||||
|  | 
 | ||||||
|  | # Choix expension | ||||||
|  | # echo "Entre ton choix (classic / tbc / wotlk) :" | ||||||
|  | # read reponse | ||||||
|  | 
 | ||||||
|  | # case "$reponse" in | ||||||
|  | #     classic) EXPANSION="classic" ;; | ||||||
|  | #     tbc)     EXPANSION="tbc" ;; | ||||||
|  | #     wotlk)   EXPANSION="wotlk" ;; | ||||||
|  | #     *)       EXPANSION="Inconnu" ;; | ||||||
|  | # esac | ||||||
|  | 
 | ||||||
|  | # Arguments | ||||||
|  | EXPANSION="${1:-wotlk}"   # exemple : wotlk / tbc / classic | ||||||
|  | THREADS="${2:-2}" | ||||||
|  | 
 | ||||||
|  | # Infos git | ||||||
|  | MANGOS_SHA1=$(curl -sSL "https://api.github.com/repos/cmangos/mangos-${EXPANSION}/commits/master" | jq -r .sha) | ||||||
|  | DATABASE_SHA1=$(curl -sSL "https://api.github.com/repos/cmangos/${EXPANSION}-db/commits/master" | jq -r .sha) | ||||||
|  | 
 | ||||||
|  | VERSION="1.0.0-$(date -u +"%Y%m%d")" | ||||||
|  | 
 | ||||||
|  | # Registry + repository | ||||||
|  | REGISTRY="wow-server" | ||||||
|  | # REPO="wow-server" | ||||||
|  | DOCKER_IMAGE="${REGISTRY}" | ||||||
|  | 
 | ||||||
|  | # Tags pour builder | ||||||
|  | BUILDER_IMAGE_TAG="${DOCKER_IMAGE}-${EXPANSION}:builder" | ||||||
|  | # Tags pour runner | ||||||
|  | RUNNER_IMAGE_TAG="${DOCKER_IMAGE}-${EXPANSION}:runner" | ||||||
|  | 
 | ||||||
|  | echo "==== Build de l’image BUILDER ====" | ||||||
|  | docker buildx build \ | ||||||
|  |   --build-arg EXPANSION="${EXPANSION}" \ | ||||||
|  |   --build-arg MANGOS_SHA1="${MANGOS_SHA1}" \ | ||||||
|  |   --build-arg DATABASE_SHA1="${DATABASE_SHA1}" \ | ||||||
|  |   --build-arg THREADS="${THREADS}" \ | ||||||
|  |   --build-arg VERSION="${VERSION}" \ | ||||||
|  |   --target builder \ | ||||||
|  |   --tag "${BUILDER_IMAGE_TAG}" \ | ||||||
|  |   --load \ | ||||||
|  |   docker/ | ||||||
|  | 
 | ||||||
|  | echo "==== Build de l’image RUNNER ====" | ||||||
|  | docker buildx build \ | ||||||
|  |   --build-arg EXPANSION="${EXPANSION}" \ | ||||||
|  |   --build-arg MANGOS_SHA1="${MANGOS_SHA1}" \ | ||||||
|  |   --build-arg DATABASE_SHA1="${DATABASE_SHA1}" \ | ||||||
|  |   --build-arg THREADS="${THREADS}" \ | ||||||
|  |   --build-arg VERSION="${VERSION}" \ | ||||||
|  |   --target runner \ | ||||||
|  |   --tag "${RUNNER_IMAGE_TAG}" \ | ||||||
|  |   --load \ | ||||||
|  |   docker/ | ||||||
|  | 
 | ||||||
|  | echo "==== Images construites ====" | ||||||
|  | docker images | grep "${DOCKER_IMAGE}" | ||||||
| @ -4,7 +4,7 @@ services: | |||||||
|     image: mariadb:11.8 |     image: mariadb:11.8 | ||||||
|     container_name: wow-db |     container_name: wow-db | ||||||
|     environment: |     environment: | ||||||
|       database_ROOT_PASSWORD: "${MYSQL_SUPERPASS}" |       MARIADB_ROOT_PASSWORD: "${MYSQL_SUPERPASS}"       | ||||||
|     volumes: |     volumes: | ||||||
|       - ./database_data:/var/lib/mysql |       - ./database_data:/var/lib/mysql | ||||||
|       - ./config/database:/etc/mysql/conf.d:ro |       - ./config/database:/etc/mysql/conf.d:ro | ||||||
| @ -12,7 +12,7 @@ services: | |||||||
|       - wow |       - wow | ||||||
| 
 | 
 | ||||||
|   mangosd: |   mangosd: | ||||||
|     image: dockerregistry.legaragenumerique.fr/wow-server-wotlk:runner |     image: wow-server-"${WOW_VERSION}":runner | ||||||
|     container_name: wow-mangosd |     container_name: wow-mangosd | ||||||
|     depends_on: |     depends_on: | ||||||
|       - database |       - database | ||||||
| @ -33,7 +33,7 @@ services: | |||||||
|       - wow |       - wow | ||||||
| 
 | 
 | ||||||
|   realmd: |   realmd: | ||||||
|     image: dockerregistry.legaragenumerique.fr/wow-server-wotlk:runner |     image: wow-server-"${WOW_VERSION}":runner | ||||||
|     container_name: wow-realmd |     container_name: wow-realmd | ||||||
|     depends_on: |     depends_on: | ||||||
|       - database |       - database | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	