mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-12 19:28:21 +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}
|
- EXTERNAL_IP=${EXTERNAL_IP:-darkflame}
|
||||||
volumes:
|
volumes:
|
||||||
- ${CLIENT_PATH:?err}:/client
|
- ${CLIENT_PATH:?err}:/client
|
||||||
- ./docker/:/docker/
|
- shared_configs:/docker/
|
||||||
|
|
||||||
database:
|
database:
|
||||||
container_name: DarkflameDatabase
|
container_name: DarkflameDatabase
|
||||||
image: mariadb:10.6
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/database.Dockerfile
|
||||||
environment:
|
environment:
|
||||||
- MARIADB_USER=${MARIADB_USER:-darkflame}
|
- MARIADB_USER=${MARIADB_USER:-darkflame}
|
||||||
- MARIADB_PASSWORD=${MARIADB_PASSWORD:-darkflame}
|
- MARIADB_PASSWORD=${MARIADB_PASSWORD:-darkflame}
|
||||||
@ -26,7 +28,6 @@ services:
|
|||||||
- MARIADB_DATABASE=${MARIADB_DATABASE:-darkflame}
|
- MARIADB_DATABASE=${MARIADB_DATABASE:-darkflame}
|
||||||
volumes:
|
volumes:
|
||||||
- database:/var/lib/mysql
|
- database:/var/lib/mysql
|
||||||
- ./migrations/dlu:/docker-entrypoint-initdb.d
|
|
||||||
networks:
|
networks:
|
||||||
- darkflame
|
- darkflame
|
||||||
ports:
|
ports:
|
||||||
@ -44,7 +45,7 @@ services:
|
|||||||
- BUILD_VERSION=${BUILD_VERSION:-171022}
|
- BUILD_VERSION=${BUILD_VERSION:-171022}
|
||||||
volumes:
|
volumes:
|
||||||
- ${CLIENT_PATH:?err}:/client
|
- ${CLIENT_PATH:?err}:/client
|
||||||
- ./docker/configs/:/configs
|
- shared_configs:/shared_configs
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
ports:
|
ports:
|
||||||
@ -98,3 +99,4 @@ networks:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
database:
|
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() {
|
function symlink_config_files() {
|
||||||
echo "Creating symlinks for config files"
|
echo "Creating symlinks for config files"
|
||||||
rm /app/*.ini
|
rm /app/*.ini
|
||||||
ln -s /configs/authconfig.ini /app/authconfig.ini
|
ln -s /shared_configs/configs/authconfig.ini /app/authconfig.ini
|
||||||
ln -s /configs/chatconfig.ini /app/chatconfig.ini
|
ln -s /shared_configs/configs/chatconfig.ini /app/chatconfig.ini
|
||||||
ln -s /configs/masterconfig.ini /app/masterconfig.ini
|
ln -s /shared_configs/configs/masterconfig.ini /app/masterconfig.ini
|
||||||
ln -s /configs/worldconfig.ini /app/worldconfig.ini
|
ln -s /shared_configs/configs/worldconfig.ini /app/worldconfig.ini
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ ! -f "/app/initialized" ]]; then
|
if [[ ! -f "/app/initialized" ]]; then
|
||||||
@ -37,6 +37,11 @@ else
|
|||||||
echo "Server already initialized"
|
echo "Server already initialized"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
while [ ! -f "/client/migrated" ]; do
|
||||||
|
echo "Client setup not finished. Waiting for setup container to complete"
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
# start the server
|
# start the server
|
||||||
echo "Start MasterServer"
|
echo "Start MasterServer"
|
||||||
./MasterServer
|
./MasterServer
|
||||||
|
Loading…
Reference in New Issue
Block a user