WIP: make this work independent of the repo directory

This commit is contained in:
Nils Bergmann 2021-12-08 14:39:19 +01:00
parent 293aaff2a5
commit 51a9f61e88
No known key found for this signature in database
GPG Key ID: 5FAEC08EE1DC2DF9
3 changed files with 18 additions and 8 deletions

View File

@ -14,11 +14,13 @@ services:
- EXTERNAL_IP=${EXTERNAL_IP:-darkflame}
volumes:
- ${CLIENT_PATH:?err}:/client
- ./docker/:/docker/
- shared_configs:/docker/
database:
container_name: DarkflameDatabase
image: mariadb:10.6
build:
context: .
dockerfile: ./docker/database.Dockerfile
environment:
- MARIADB_USER=${MARIADB_USER:-darkflame}
- MARIADB_PASSWORD=${MARIADB_PASSWORD:-darkflame}
@ -26,7 +28,6 @@ services:
- MARIADB_DATABASE=${MARIADB_DATABASE:-darkflame}
volumes:
- database:/var/lib/mysql
- ./migrations/dlu:/docker-entrypoint-initdb.d
networks:
- darkflame
ports:
@ -44,7 +45,7 @@ services:
- BUILD_VERSION=${BUILD_VERSION:-171022}
volumes:
- ${CLIENT_PATH:?err}:/client
- ./docker/configs/:/configs
- shared_configs:/shared_configs
depends_on:
- database
ports:
@ -98,3 +99,4 @@ networks:
volumes:
database:
shared_configs:

View File

@ -0,0 +1,3 @@
FROM mariadb:10.6
COPY ./migrations/dlu /docker-entrypoint-initdb.d

View File

@ -21,10 +21,10 @@ function symlink_client_files() {
function symlink_config_files() {
echo "Creating symlinks for config files"
rm /app/*.ini
ln -s /configs/authconfig.ini /app/authconfig.ini
ln -s /configs/chatconfig.ini /app/chatconfig.ini
ln -s /configs/masterconfig.ini /app/masterconfig.ini
ln -s /configs/worldconfig.ini /app/worldconfig.ini
ln -s /shared_configs/configs/authconfig.ini /app/authconfig.ini
ln -s /shared_configs/configs/chatconfig.ini /app/chatconfig.ini
ln -s /shared_configs/configs/masterconfig.ini /app/masterconfig.ini
ln -s /shared_configs/configs/worldconfig.ini /app/worldconfig.ini
}
if [[ ! -f "/app/initialized" ]]; then
@ -37,6 +37,11 @@ else
echo "Server already initialized"
fi
while [ ! -f "/client/migrated" ]; do
echo "Client setup not finished. Waiting for setup container to complete"
sleep 1
done
# start the server
echo "Start MasterServer"
./MasterServer