Fully working initial release

master
Meliurwen 3 years ago
commit 72b6f05c8d
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 7
      .env.example
  2. 1
      .gitignore
  3. 20
      docker-compose.yml
  4. 50
      solanum/Dockerfile
  5. 20
      solanum/root/start.sh

@ -0,0 +1,7 @@
# Global Settings
TZ=Etc/UTC
LOCAL_STACK_DIR=/srv/docker/volumes/ircd
# solanum (optional)
SO_CONTAINER_NAME=
SO_RESTART=

1
.gitignore vendored

@ -0,0 +1 @@
*.env

@ -0,0 +1,20 @@
version: "3"
services:
solanum:
build:
context: solanum/
container_name: ${SO_CONTAINER_NAME:-ircd-solanum}
restart: ${SO_RESTART:-unless-stopped}
volumes:
- ${LOCAL_STACK_DIR}/solanum/etc:/srv/config
- ${LOCAL_STACK_DIR}/solanum/certs:/certs
- ${LOCAL_STACK_DIR}/solanum/logs:/srv/logs
ports:
- 5000:5000
- 6665-6669:6665-6669
- 6697:6697
- 9999:9999
environment:
- TZ=${TZ}

@ -0,0 +1,50 @@
FROM alpine:latest AS builder
LABEL maintainer="Meliurwen <meliruwen@gmail.com>"
RUN apk --update add git
RUN git clone --depth 1 https://github.com/solanum-ircd/solanum.git /solanum
WORKDIR /solanum
RUN apk add \
sqlite-dev \
automake \
autoconf \
libtool
RUN ./autogen.sh
RUN apk add \
gcc \
g++ \
bison \
flex \
make \
mbedtls-dev
RUN ./configure \
--prefix=/srv/ircd \
--enable-mbedtls
RUN apk add \
util-linux
RUN ./configure --prefix=/srv/ircd --enable-mbedtls && \
make && \
make install
FROM alpine:latest
RUN apk add --no-cache \
mbedtls \
libltdl \
sqlite-libs \
&& adduser -D ircd
COPY --from=builder --chown=ircd /srv/ircd /srv/ircd
COPY root/ /
EXPOSE 5000 6665-6669 6697 9999
ENTRYPOINT ["/start.sh"]

@ -0,0 +1,20 @@
#!/bin/sh
mkdir -p /srv/config /srv/logs
chown ircd:ircd -R /srv/config /srv/logs
if [ ! -e /srv/config/ircd.conf ]; then
echo "Configuration file not found. Generating it..."
cp /srv/ircd/etc/ircd.conf.example /srv/config/ircd.conf
fi
if [ ! -e /srv/config/ircd.motd ]; then
echo "MOTD file not found. Generating it..."
cp /srv/ircd/etc/ircd.motd /srv/config/ircd.motd
fi
su ircd -c "/srv/ircd/bin/solanum \
-configfile /srv/config/ircd.conf \
-logfile /srv/logs/ircd.logs \
-foreground"
Loading…
Cancel
Save