forked from Hay1tsme/artemis
1
0
Fork 0

documentation for docker setup, tweak dockerfile

This commit is contained in:
ash 2023-12-07 00:21:02 -05:00
parent a497a9806d
commit 3b5f225740
3 changed files with 75 additions and 2 deletions

View File

@ -1,6 +1,6 @@
FROM python:3.9.15-slim-bullseye
RUN apt update && apt install default-libmysqlclient-dev build-essential libtk nodejs npm -y
RUN apt update && apt install default-libmysqlclient-dev build-essential libtk nodejs npm pkg-config -y
WORKDIR /app
COPY requirements.txt requirements.txt
@ -12,6 +12,7 @@ RUN chmod +x entrypoint.sh
COPY index.py index.py
COPY dbutils.py dbutils.py
COPY read.py read.py
ADD core core
ADD titles titles
ADD config config

72
docs/INSTALL_DOCKER.md Normal file
View File

@ -0,0 +1,72 @@
# ARTEMiS - Docker Guide
This step-by-step guide assumes that you are running docker on Ubuntu 22.04.3 LTS with prior experience in Docker and Linux.
## Setup
1. Clone this code repository to a local folder
> git clone https://gitea.tendokyu.moe/fraxiinus/artemis.git
2. Create folders core, titles, config, log, cert in the nearly created artemis directory
3. Edit 'docker-compose.yml' file and make the following changes:
- Set AimeDB key value for `CFG_CORE_AIMEDB_KEY` variable; find it yourself
- Change database password `MYSQL_PASSWORD` variable; this will be used later for the app to connect to the database
- Change `MYSQL_ROOT_PASSWORD` variable
- Change `PMA_PASSWORD` variable; this is used for the database web-admin site
4. Rename/copy 'example_config' folder to 'config'
5. Edit 'config/core.yaml' file and make the following changes:
- Change server `listen_address` value to `0.0.0.0`
- Change title `hostname` value to your server's local IP (ex. `192.168.xxx.xxx`)
- Change database `host` value to `ma.db`
- Change database `password` value to the same value as `MYSQL_PASSWORD` from the 'docker-compose.yml' file
- Change database `memcached_host` value to `ma.memcached`
- Change aimedb `key` value to the AimeDB key value
- Change mucha `hostname` value to `0.0.0.0`
6. Copy data folders (bin and options) for whatever game you want this server to support, into the artemis directory
7. Edit 'Dockerfile' and be sure to add the data folders for the game you just added:
```dockerfile
ADD yourFolder yourFolder
```
8. Edit the file `entrypoint.sh` folder and add the correct importer commands after the line `python3 dbutils.py create`. See [Games documentation](game_specific_info.md) page for command examples.
## Run
Start the application
> docker-compose up
## Troubleshooting
### Game does not connect to ARTEMiS Allnet server
Double-check your core.yaml, the listen_address is most likely either not binded to the proper IP or the port is not opened
### Game does not connect to Title Server
1. Verify that your core.yaml is setup properly for both the server listen_address and title hostname
2. Boot your game and verify that an AllNet response does show and if it does, attempt to open the URI that is shown under a browser such as Edge, Chrome & Firefox.
3. If a page is shown, the server is working properly and if it doesn't, double check your port forwarding and also that you have entered the proper local IP under the Title hostname in core.yaml.
### Unhandled command under AimeDB
Double check your AimeDB key under core.yaml, it is incorrect.
### Memcache failed, error 3
1. Make sure memcached is properly installed and running. You can check the status of the service using the following command:
> sudo systemctl status memcached
2. If it is failing, double check the /etc/memcached.conf file, it may have duplicated arguments like the -I and -m
3. If it is still not working afterward, you can proceed with a workaround by manually editing the /core/data/cache.py file.
```py
# Make memcache optional
try:
has_mc = False
except ModuleNotFoundError:
has_mc = False
```

View File

@ -40,7 +40,7 @@ Games listed below have been tested and confirmed working. Only game versions ol
- mysql/mariadb server
## Setup guides
Follow the platform-specific guides for [windows](docs/INSTALL_WINDOWS.md) and [ubuntu](docs/INSTALL_UBUNTU.md) to setup and run the server.
Follow the platform-specific guides for [windows](docs/INSTALL_WINDOWS.md), [ubuntu](docs/INSTALL_UBUNTU.md), and [docker](docs/INSTALL_DOCKER.md) to setup and run the server.
## Game specific information
Read [Games specific info](docs/game_specific_info.md) for all supported games, importer settings, configuration option and database upgrades.