switching to postgre and LuaJIT

This commit is contained in:
cpp 2020-04-05 13:43:52 +02:00 committed by Hive
parent ba016e7a0d
commit ebf5c6cee1
2 changed files with 23 additions and 4 deletions

View file

@ -7,7 +7,8 @@ EXPOSE 30000
# and specify an admin in your configuration. # and specify an admin in your configuration.
ENV CURSES FALSE ENV CURSES FALSE
ENV BUILD_PCKGS "build-essential cmake libirrlicht-dev git ca-certificates" ENV BUILD_PCKGS "build-essential cmake libirrlicht-dev git ca-certificates \
postgresql-server-dev-all luajit "
ENV LIVE_PCKGS "zlib1g-dev libbz2-dev libncurses-dev libsqlite3-dev \ ENV LIVE_PCKGS "zlib1g-dev libbz2-dev libncurses-dev libsqlite3-dev \
libcurl4-gnutls-dev libfreetype6-dev libgmp-dev libjsoncpp-dev" libcurl4-gnutls-dev libfreetype6-dev libgmp-dev libjsoncpp-dev"
ENV DEBIAN_FRONTEND non-interactive ENV DEBIAN_FRONTEND non-interactive
@ -22,7 +23,9 @@ WORKDIR minetest
RUN git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game RUN git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game
RUN cmake . -DRUN_IN_PLACE=FALSE -DBUILD_SERVER=TRUE \ RUN cmake . -DRUN_IN_PLACE=FALSE -DBUILD_SERVER=TRUE \
-DBUILD_CLIENT=FALSE -DCMAKE_BUILD_TYPE=Release -DENABLE_CURSES=${CURSES} -DBUILD_CLIENT=FALSE -DENABLE_POSTGRESQL=ON \
-DCMAKE_BUILD_TYPE=Release -DENABLE_CURSES=${CURSES}\
-DLUAJIT=1
RUN make install RUN make install
@ -30,7 +33,7 @@ RUN make install
RUN apt-get remove -y --autoremove ${BUILD_PCKGS} && \ RUN apt-get remove -y --autoremove ${BUILD_PCKGS} && \
apt-get clean && rm -rf /root/minetest apt-get clean && rm -rf /root/minetest
RUN useradd minetest -m && \ RUN useradd minetest -m -u 1000 && \
su minetest -c "mkdir -p ~/.minetest/worlds" su minetest -c "mkdir -p ~/.minetest/worlds"
VOLUME /home/minetest/.minetest/worlds VOLUME /home/minetest/.minetest/worlds

View file

@ -1,5 +1,8 @@
version: "2" version: "2"
networks:
internal:
services: services:
minetest-git: minetest-git:
build: . build: .
@ -7,4 +10,17 @@ services:
- "30000:30000/udp" - "30000:30000/udp"
- "30000:30000" - "30000:30000"
volumes: volumes:
- /data/minetest/:/home/minetest/.minetest/worlds/ - /data/minetest/:/home/minetest/.minetest/worlds/
networks:
- internal
postgres:
hostname: postgres
image: postgres
environment:
- POSTGRES_USER=minetest
- POSTGRES_PASSWORD=minetest
- POSTGRES_DB=minetest
volumes:
- /data/minetest/database:/var/lib/postgresql/data
networks:
- internal