Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Reorganization/update of the repo #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
*.iws
*.iml

### Python
*.pyc

### Docker
dedicated_vars.env
*dedicated_vars.env

/dedicated
/mysql
### ssh host keys
full-template/ssh_host_keys/*
33 changes: 0 additions & 33 deletions Dockerfile

This file was deleted.

100 changes: 97 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,100 @@
# Docker Compose for PyPlanet
# How to use [pyplanet/controller image](https://hub.docker.com/r/pyplanet/controller/)

## Installation
`docker run -d --name MySuperPyplanetController -e ... (available env variables below) pyplanet/controller`

... todo ...
## Environment Variables

------

### If you are using MySQL (or MariaDB, PerconaDB, etc).

`MYSQL_DATABASE` ( default : pyplanet )

`MYSQL_HOST`

`MYSQL_USER` ( default : pyplanet )

`MYSQL_PASSWORD` ( default : pyplanet )

### If you are using PostgreSQL.

`POSTGRES_DB` ( default : pyplanet )

`POSTGRES_HOST`

`POSTGRES_USER` ( default : pyplanet )

`POSTGRES_PASSWORD` ( default : pyplanet )



`MANIAPLANET_HOST` ( default : dedicated )

Address of the maniaplanet server.

`MANIAPLANET_PORT` ( default : 5000 )

XML-RPC port.

`MANIAPLANET_USER` ( default : SuperAdmin )

`MANIAPLANET_PASSWORD` ( default: SuperAdmin )

`MANIAPLANET_OWNER_LOGIN`

The owner will get *ALL* the permissions in the system.

# Docker Compose and PyPlanet

This repository contain a docker-compose template that you can easily use and adapt according to your needs.
More templates will come in a near futur.

### Full template

This template provide a full setup, including Maniaplanet, PyPlanet, PHPMyAdmin, MariaDB and SFTP server.
Here is a litle schematic to describe the network :
```
+--------+
|NETWORKS|
+--------+

Back Network Front Network
+ +
| |
| |
| +--------+ |
|----|PyPlanet| |
| +--------+ |
| |
| +-------+ |
3306|----|MariaDB| |
| +-------+ |
| |
| +-----------+ |
5000|----|Maniaplanet|---|2350,3450
| +-----------+ |
| |
| +----------+ |
+----|PHPMyAdmin|----|8080
+----------+ |
|
+----+ |
|SFTP|----+8022
+----+

```
This template use 4 named volumes :
* **maniaplanet** : Maniaplanet server folder.
* **maniaplanet_configs** : Config that is used at the first start of the Maniaplanet container.
* **pyplanet** : PyPlanet folder.
* **database** : /var/lib/mysql of mariadb container.

To use this template you only have two things to do :
* Rename dedicated_vars.env.default to dedicated_vars.env and fill it.
* Generate your ssh host key by executing the ssh_host_keygen.sh script.

Then you are ready to use it ``docker-compose up -d``.

### How to update ?

To update, you just need to execute `docker-compose pull` then `docker-compose up -d`.
99 changes: 0 additions & 99 deletions base.py

This file was deleted.

7 changes: 0 additions & 7 deletions dedicated_vars.default.env

This file was deleted.

43 changes: 0 additions & 43 deletions docker-compose.yml

This file was deleted.

29 changes: 29 additions & 0 deletions full-template/dedicated_vars.env.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#PyPlanet
MANIAPLANET_HOST=dedicated
MANIAPLANET_PORT=5000
MANIAPLANET_USER=SuperAdmin
MANIAPLANET_PASSWORD=SuperAdmin
MANIAPLANET_OWNER_LOGIN=
MYSQL_HOST=db

#Database config ( also applied in the pyplanet configuration ).
MYSQL_USER=pyplanet
MYSQL_PASSWORD=pyplanet
MYSQL_DATABASE=pyplanet
# You can define the root password if you need it or just keep it random. By default, it's random
#MYSQL_ROOT_PASSWORD=
MYSQL_RANDOM_ROOT_PASSWORD=yes

#Maniaplanet dedicated server IDs. See: https://maniaplanet.com/account/dedicated-servers
LOGIN=
PASSWORD=

#Maniaplanet dedicated server config.
TITLE=TMStadium@nadeo
TITLE_PACK_URL=https://v4.live.maniaplanet.com/ingame/public/titles/download/TMStadium@nadeo.Title.Pack.gbx
TITLE_PACK_FILE=TMStadium@nadeo.Title.Pack.gbx
MATCH_SETTINGS=MatchSettings/default.txt
SERVER_NAME=DefaultName

#SFTP password of maniaplanet user. By default listening 0.0.0.0:8022 on your host.
SFTP_PASSWORD=
Loading