Configuration files are automatically generated based on env variables in the Docker image

This commit is contained in:
2024-06-02 21:45:51 +03:00
parent 6d65fae7e4
commit 170be95dc5
8 changed files with 104 additions and 15 deletions

View File

@ -29,7 +29,7 @@ RUN cd build && make -j $(nproc)
FROM ubuntu:22.04 as app
WORKDIR /app
RUN apt-get update && apt-get install -y python2 libdevil-dev libbsd-dev && apt-get clean
RUN apt-get update && apt-get install -y gettext python2 libdevil-dev libbsd-dev && apt-get clean
# Copy the binaries from the build stage
COPY --from=build /app/build/src/db/db /bin/db
@ -39,6 +39,9 @@ COPY --from=build /app/build/src/quest/qc /bin/qc
# Copy the game files
COPY ./gamefiles/ .
# Copy the auxiliary files
COPY ./docker/ .
# Compile the quests
RUN cd /app/data/quest && python2 make.py
@ -48,3 +51,9 @@ RUN ln -s ./conf/item_names_en.txt item_names.txt
RUN ln -s ./conf/item_proto.txt item_proto.txt
RUN ln -s ./conf/mob_names_en.txt mob_names.txt
RUN ln -s ./conf/mob_proto.txt mob_proto.txt
# Set up default environment variables
ENV PUBLIC_BIND_IP 0.0.0.0
ENV INTERNAL_BIND_IP 0.0.0.0
ENTRYPOINT ["/usr/bin/bash", "docker-entrypoint.sh"]