commit ad1b0a5f532ddc4270fb4de2fccc17fc3c12d481 Author: Aaron Riedel Date: Tue Nov 7 23:39:38 2023 +0200 initial commit diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..7b216cb --- /dev/null +++ b/.drone.yml @@ -0,0 +1,25 @@ +kind: pipeline +type: docker +name: storagebox-exporter + +steps: +- name: build + image: gcc:12 + commands: + - git clone --recursive https://github.com/DarkflameUniverse/DarkflameServer + - cd DarkflameServer + - ./build.sh -j4 +- name: docker-build + image: plugins/docker + settings: + username: + from_secret: DOCKER_USERNAME + password: + from_secret: DOCKER_PASSWORD + repo: aaronriedel/darkflameserver + tags: latest +when: + branch: + - main + event: + - push \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dad4175 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM debian:12-slim + +WORKDIR /app + +COPY ./DarkflameServer/build /app +COPY ./start.sh /app/ + +RUN chmod +x /app/start.sh + +ENV MYSQL_HOST darkflame_db +ENV MYSQL_DATABASE darkflame +ENV MYSQL_USERNAME darkflame +ENV MAX_CLIENTS 999 +ENV TEAM_LOOT 1 +ENV CLIENT_VERSION 171022 + +ENTRYPOINT ['/app/start.sh'] diff --git a/README.md b/README.md new file mode 100644 index 0000000..00521d8 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +[![Build Status](https://drone.ar21.de/api/badges/aaron/darkflameserver/status.svg)](https://drone.ar21.de/aaron/darkflameserver) \ No newline at end of file diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..649bbb4 --- /dev/null +++ b/start.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env +set -euo pipefail + +echo "-----------------------" +echo "DarkflameServer Docker" +echo "written by Aaron Riedel" +echo "-----------------------" +echo "" +echo "create sharedconfig.ini" +# make sharedconfig.ini +echo "mysql_host=$MYSQL_HOST" > /app/sharedconfig.ini +echo "mysql_database=$MYSQL_DATABASE" >> /app/sharedconfig.ini +echo "mysql_username=$MYSQL_USERNAME" >> /app/sharedconfig.ini +echo "mysql_password=$MYSQL_PASSWORD" >> /app/sharedconfig.ini +echo "log_to_console=1" >> /app/sharedconfig.ini +echo "log_debug_statements=0" >> /app/sharedconfig.ini +echo "external_ip=localhost" >> /app/sharedconfig.ini +echo "dont_generate_dcf=0" >> /app/sharedconfig.ini +echo "max_clients=$MAX_CLIENTS" >> /app/sharedconfig.ini +echo "dump_folder=/dev/null" >> /app/sharedconfig.ini +echo "client_location=" >> /app/sharedconfig.ini +echo "maximum_outgoing_bandwidth=80000" >> /app/sharedconfig.ini +echo "maximum_mtu_size=1228" >> /app/sharedconfig.ini +echo "client_net_version=$CLIENT_VERSION" >> /app/sharedconfig.ini +echo "default_team_loot=$TEAM_LOOT" >> /app/sharedconfig.ini \ No newline at end of file