Add variants and EA image

This commit is contained in:
Thijn Geurts
2024-09-09 20:45:50 +02:00
parent 3f606dd5c6
commit bb2c817c0d
24 changed files with 683 additions and 0 deletions

30
ea/Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
FROM node:18.20.4-slim
# Cache apt-get update and package installs
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
wget libzmq3-dev libzmq5 libmariadb-dev libcurl4
# SSL 1.1 setup
# download install package
RUN wget http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1w-0+deb11u1_amd64.deb && dpkg -i libssl1.1_1.1.1w-0+deb11u1_amd64.deb
RUN npm i -g pm2
RUN adduser --disabled-password --home /home/container container
USER container
COPY dockerstart.sh /
WORKDIR /home/container
ENV PORT=8192
ENV HOME=/home/container
EXPOSE 8192/udp
# Set entrypoint
CMD ["bash", "/dockerstart.sh"]

2
ea/build.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
docker build -t vcmp_04rel64:ea .

12
ea/dockerstart.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
mkdir -p /home/container/discord_bot /home/container/server
cd '/home/container/discord_bot'
npm install
pm2 start bot.js
cd /home/container/server
echo 'Starting server on' $PORT
# Using stdbuf to force unbuffered output since server is not directly connected to terminal and is buffering output
stdbuf -oL ./server -allow-server-runas-root -port $PORT

3
ea/publish.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker tag vcmp_04rel64:ea docker.panel2.viceunderdogs.com/vcmp-04rel64:ea
docker push docker.panel2.viceunderdogs.com/vcmp-04rel64:ea

BIN
ea/query Executable file

Binary file not shown.