mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-12 19:28:21 +00:00
WIP: produce valid MasterServer binary
This commit is contained in:
parent
9387e88dc0
commit
e714cacc58
@ -31,6 +31,8 @@ services:
|
|||||||
- DATABASE_PASSWORD=${MARIADB_PASSWORD:-darkflame}
|
- DATABASE_PASSWORD=${MARIADB_PASSWORD:-darkflame}
|
||||||
volumes:
|
volumes:
|
||||||
- $CLIENT_PATH:/client
|
- $CLIENT_PATH:/client
|
||||||
|
depends_on:
|
||||||
|
- database
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
darkflame:
|
darkflame:
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
FROM debian:11-slim as build
|
FROM gcc:11 as build
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/var/cache/apt \
|
RUN --mount=type=cache,id=build-apt-cache,target=/var/cache/apt \
|
||||||
echo "Install build dependencies" && \
|
echo "Install build dependencies" && \
|
||||||
apt update && \
|
apt update && \
|
||||||
apt remove -y libmysqlcppconn7v5 libmysqlcppconn-dev && \
|
apt remove -y libmysqlcppconn7v5 libmysqlcppconn-dev && \
|
||||||
apt install cmake zlib1g-dev make gcc g++ build-essential unzip ca-certificates wget -yqq --no-install-recommends && \
|
apt install cmake zlib1g zlib1g-dev unzip -yqq --no-install-recommends && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/*
|
||||||
update-ca-certificates && \
|
|
||||||
wget https://dev.mysql.com/get/Downloads/Connector-C++/libmysqlcppconn9_8.0.27-1debian11_amd64.deb -O /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb && \
|
|
||||||
dpkg -i /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb && \
|
|
||||||
rm -rf /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb
|
|
||||||
|
|
||||||
COPY dAuthServer/ /build/dAuthServer
|
COPY dAuthServer/ /build/dAuthServer
|
||||||
COPY dChatServer/ /build/dChatServer
|
COPY dChatServer/ /build/dChatServer
|
||||||
@ -44,7 +40,13 @@ RUN echo "Build server" && \
|
|||||||
RUN mkdir -p /build/build/res/maps/navmeshes/ && \
|
RUN mkdir -p /build/build/res/maps/navmeshes/ && \
|
||||||
unzip /build/resources/navmeshes.zip -d /build/build/res/maps
|
unzip /build/resources/navmeshes.zip -d /build/build/res/maps
|
||||||
|
|
||||||
FROM debian:11-slim as runtime
|
FROM gcc:11 as runtime
|
||||||
|
|
||||||
|
RUN --mount=type=cache,id=runtime-apt-cache,target=/var/cache/apt \
|
||||||
|
apt update && \
|
||||||
|
apt install mariadb-client python3 sudo sqlite3 -yqq --no-install-recommends && \
|
||||||
|
apt remove -y libmysqlcppconn7v5 libmysqlcppconn-dev && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@ -52,15 +54,7 @@ COPY --from=build /build/build /app
|
|||||||
|
|
||||||
COPY --from=build /build/migrations /app/migrations
|
COPY --from=build /build/migrations /app/migrations
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/var/cache/apt \
|
RUN mkdir -p /build/build && ln -s /app/_deps /build/build/_deps
|
||||||
apt update && \
|
|
||||||
apt install mariadb-client python3 sqlite3 ca-certificates wget -yqq --no-install-recommends && \
|
|
||||||
apt remove -y libmysqlcppconn7v5 libmysqlcppconn-dev && \
|
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
|
||||||
update-ca-certificates && \
|
|
||||||
wget https://dev.mysql.com/get/Downloads/Connector-C++/libmysqlcppconn9_8.0.27-1debian11_amd64.deb -O /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb && \
|
|
||||||
dpkg -i /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb && \
|
|
||||||
rm -rf /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb
|
|
||||||
|
|
||||||
ADD docker/*.py /app/utils/
|
ADD docker/*.py /app/utils/
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ function update_database_ini_values_for() {
|
|||||||
update_ini $INI_FILE mysql_host $DATABASE_HOST
|
update_ini $INI_FILE mysql_host $DATABASE_HOST
|
||||||
update_ini $INI_FILE mysql_database $DATABASE
|
update_ini $INI_FILE mysql_database $DATABASE
|
||||||
update_ini $INI_FILE mysql_username $DATABASE_USER
|
update_ini $INI_FILE mysql_username $DATABASE_USER
|
||||||
update_ini $INI_FILE mysql_password $USE_DATABASE_PASSWORD
|
update_ini $INI_FILE mysql_password $DATABASE_PASSWORD
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_ini_values() {
|
function update_ini_values() {
|
||||||
@ -75,7 +75,7 @@ function fdb_to_sqlite() {
|
|||||||
readarray -d '' entries < <(printf '%s\0' *.sql | sort -zV)
|
readarray -d '' entries < <(printf '%s\0' *.sql | sort -zV)
|
||||||
for entry in "${entries[@]}"; do
|
for entry in "${entries[@]}"; do
|
||||||
echo "Execute $entry"
|
echo "Execute $entry"
|
||||||
sqlite3 ../../res/CDServer.sqlite < $entry
|
sqlite3 /app/res/CDServer.sqlite < $entry
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user