mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
WIP: make this work independent of the repo directory
This commit is contained in:
parent
293aaff2a5
commit
51a9f61e88
@ -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:
|
||||
|
3
docker/database.Dockerfile
Normal file
3
docker/database.Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM mariadb:10.6
|
||||
|
||||
COPY ./migrations/dlu /docker-entrypoint-initdb.d
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user