add docker-compose file for services

This commit is contained in:
root 2024-10-28 08:00:07 +03:00
parent 1760ec6471
commit c87d46c06c
4 changed files with 25 additions and 6 deletions

1
services/.env Symbolic link
View File

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

View File

@ -12,8 +12,6 @@ RUN useradd --system --shell /bin/bash atheme -g atheme
WORKDIR /tmp
RUN apt -y install libperl-dev
RUN git clone https://github.com/atheme/atheme.git
WORKDIR /tmp/atheme
@ -26,7 +24,7 @@ RUN make -j$(nproc)
RUN make install
RUN mkdir -p /etc/atheme -p /etc/ssl/atheme -p /var/lib/atheme -p /var/log/atheme
RUN mkdir -p /etc/atheme -p /etc/ssl/atheme -p /var/log/atheme
RUN mv /usr/local/etc /usr/local/etc_old
@ -43,7 +41,7 @@ RUN openssl req -new -key /etc/ssl/atheme/server.key -out /etc/ssl/atheme/server
RUN openssl x509 -req -days 365 -in /etc/ssl/atheme/server.csr -signkey /etc/ssl/atheme/server.key -out /etc/ssl/atheme/server.crt
RUN chown -R atheme:atheme /etc/atheme /etc/ssl/atheme /var/log/atheme /var/lib/atheme
RUN chown -R atheme:atheme /etc/atheme /etc/ssl/atheme /var/log/atheme
WORKDIR /
@ -55,8 +53,6 @@ VOLUME /etc/atheme
VOLUME /etc/ssl/atheme
VOLUME /var/lib/atheme
VOLUME /var/log/atheme
ENTRYPOINT ["/usr/local/bin/atheme-services", "-p", "/tmp/atheme.pid", "-n"]

View File

@ -0,0 +1 @@
SERVER_NAME="services.lame-network.local"

View File

@ -0,0 +1,21 @@
services:
atheme:
build:
context: .
args:
BUILD_SERVER_NAME: ${SERVER_NAME}
image: atheme
network_mode: "host"
env_file: "config.env"
volumes:
- data:/etc/atheme
- ./include.conf:/etc/atheme/include.conf:ro
- ssl:/etc/ssl/atheme
- log:/var/log/atheme
volumes:
data:
name: atheme_data
ssl:
name: atheme_ssl
log:
name: atheme_log