Added logs and services.db to atheme data volume, simplified entrypoint.sh with the ability to add custom parameters for atheme and solanium

master
Meliurwen 3 years ago
parent eed845f0b2
commit d4167aa0aa
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 8
      atheme/Dockerfile
  2. 20
      atheme/root/entrypoint.sh
  3. 5
      docker-compose.yml
  4. 16
      solanum/root/entrypoint.sh

@ -19,7 +19,10 @@ RUN apk add \
g++ \
pkgconfig
RUN ./configure \
--prefix=/srv/atheme
--prefix=/srv/atheme \
--sysconfdir=/srv/data/etc \
--enable-fhs-paths \
--localstatedir=/srv/data/var
RUN cd libmowgli-2 && \
git pull origin master
@ -27,7 +30,8 @@ RUN cd libmowgli-2 && \
RUN apk add \
make
RUN make -j${MK_THREADS:-$(nproc)} && \
make install
make install && \
mv /srv/data/* /srv/atheme/
FROM alpine:latest

@ -1,18 +1,16 @@
#!/bin/sh
DATADIR=/srv/data/etc
mkdir -p /srv/data/etc
mkdir -p "$DATADIR"
for file_path in /srv/atheme/etc/*.example; do
file_name="$(basename "$file_path")"
cp -n -p "$file_path" "/srv/data/etc/${file_name%%.example}"
done
chown atheme:atheme -R "$DATADIR"
cp -n -p -r /srv/atheme/var /srv/data/
if [ ! -e $DATADIR/atheme.conf ]; then
printf "Configuration file not found. Generating it..."
cp /srv/atheme/etc/atheme.conf.example $DATADIR/atheme.conf
fi
rm -f /srv/atheme/var/atheme.pid
rm -f /srv/data/var/run/atheme/atheme.pid
su atheme \
-c "/srv/atheme/bin/atheme-services \
-c $DATADIR/atheme.conf \
-n"
-n \
$*"

@ -16,6 +16,7 @@ services:
- 9999:9999
environment:
- TZ=${TZ}
command: ${SO_CMD}
atheme:
build:
@ -24,3 +25,7 @@ services:
restart: ${AT_RESTART:-unless-stopped}
volumes:
- ${LOCAL_STACK_DIR}/atheme/data:/srv/data
command: ${AT_CMD}
networks:
default:

@ -2,18 +2,12 @@
mkdir -p /srv/data/etc /srv/data/logs
chown solanum:solanum -R /srv/data
chown solanum:solanum -R /srv/data/logs
if [ ! -e /srv/data/etc/ircd.conf ]; then
echo "Configuration file not found. Generating it..."
cp /srv/solanum/etc/ircd.conf.example /srv/data/etc/ircd.conf
fi
if [ ! -e /srv/data/etc/ircd.motd ]; then
echo "MOTD file not found. Generating it..."
cp /srv/solanum/etc/ircd.motd /srv/data/etc/ircd.motd
fi
cp -n -p /srv/solanum/etc/ircd.conf.example /srv/data/etc/ircd.conf
cp -n -p /srv/solanum/etc/ircd.motd /srv/data/etc/ircd.motd
su solanum \
-c "/srv/solanum/bin/solanum \
-foreground"
-foreground \
$*"

Loading…
Cancel
Save