29 Commits

Author SHA1 Message Date
Deon George
16c3f94992 Updates for SBBS v3.19 2021-04-05 00:06:21 +10:00
Deon George
f939158f42 Moved Doorparty out into its own container 2021-03-16 21:02:11 +11:00
Deon George
63ea56421e doorparty.sh is for Intel not arm 2021-01-21 22:41:27 +11:00
Deon George
3313d5e330 Add Doorparty Connector 2021-01-16 23:56:28 +11:00
Deon George
60af119bb9 Move xtrn into xtrn orig 2021-01-16 23:43:47 +11:00
Deon George
3fcabaf58e Revert "Revert patch f6ffda09 - fails to build otherwise"
This reverts commit 0dc5ddde5e.

No longer required, fix implemented upstream.
2021-01-13 22:46:46 +11:00
Deon George
3e9ecf42da More fixes for nodes/ initialisation 2021-01-13 22:44:32 +11:00
Deon George
4053b0081e Fix location of patch 2020-11-23 14:24:20 +11:00
Deon George
2c731f2bd8 Fix nodes/ initialisation 2020-11-23 14:17:42 +11:00
Deon George
a13e99ccfd Put initial main.cnf in the right place for initial builds 2020-11-23 13:32:22 +11:00
Deon George
0dc5ddde5e Revert patch f6ffda09 - fails to build otherwise 2020-11-23 13:27:06 +11:00
Deon George
b0b3889f0d Changed leenooks apt repository config 2020-11-23 13:26:17 +11:00
Deon George
cc4da2cd94 Updated to new main.cnf where nodes are in nodes/ 2020-11-23 13:26:17 +11:00
Deon George
a03bf979a8 Remove git repo after install 2020-09-10 12:18:28 +10:00
Deon George
abb660f380 Change version to latest 2020-09-10 12:17:40 +10:00
Deon George
b82d77534b Change CVS to GIT, added PHP 2020-09-10 00:28:02 +10:00
Deon George
8020b06e06 Added sqlite and xml php libraries 2020-08-12 16:33:04 +10:00
Deon George
07d781a18d Fixed daemon name checking 2020-08-02 17:53:03 +10:00
Deon George
c4f4769bcf Added missing library libnspr4 2020-07-08 16:58:49 +10:00
Deon George
5dfc317e87 Cant have RELEASE=1 and DEBUG=1 2020-07-08 10:10:51 +10:00
Deon George
c3324db785 Force SBBS to build libmoz 2020-07-08 09:57:13 +10:00
Deon George
e7e4b3eec8 Updates and now enabled using daemon mode 2020-06-21 14:03:27 +10:00
Deon George
6ce8e626f1 Remove makenl, update to 3.18a 2020-05-13 23:36:32 +10:00
Deon George
d1a7de1949 Revert "Fix build on armv7l due to Open File Descriptor Locks used in latest CVS"
This reverts commit b69cf7851a.
2020-05-13 23:36:16 +10:00
Deon George
b69cf7851a Fix build on armv7l due to Open File Descriptor Locks used in latest CVS 2019-08-28 15:28:32 +10:00
Deon George
31b240ba37 Add DOCKER_DRIVER to address CI docker push issues 2019-08-26 12:00:04 +10:00
Deon George
0689ba85c2 Fixes for logrotate 2019-08-17 12:30:56 +10:00
Deon George
5dcdfd0705 Added supervisor/logrotate and startup dirs use symlinks 2019-08-14 20:56:48 +10:00
Deon George
3d0236736d Removed DOSEMU, not avialable for arm 2019-07-25 21:24:26 +10:00
7 changed files with 61 additions and 136 deletions

View File

@@ -1,104 +0,0 @@
name: Create Docker Image
run-name: ${{ gitea.actor }} Building Docker Image 🐳
on: [push]
env:
VERSION: latest
DOCKER_HOST: tcp://127.0.0.1:2375
jobs:
build:
strategy:
matrix:
arch:
- x86_64
# - arm64
# needs: [test]
name: Build Docker Image
runs-on: docker-${{ matrix.arch }}
container:
image: docker:dind
privileged: true
env:
ARCH: ${{ matrix.arch }}
VERSIONARCH: ${{ env.VERSION }}-${{ env.ARCH }}
steps:
- name: Environment Setup
run: |
# If we have a proxy use it
if [ -n "${HTTP_PROXY}" ]; then echo "HTTP PROXY [${HTTP_PROXY}]"; sed -i -e s'/https/http/' /etc/apk/repositories; fi
# Some pre-reqs
apk add git curl nodejs
# Start docker
( dockerd --host=tcp://0.0.0.0:2375 --tls=false & ) && sleep 3
## Some debugging info
# docker info && docker version
# env|sort
- name: Registry FQDN Setup
id: registry
run: |
registry=${{ github.server_url }}
echo "registry=${registry##http*://}" >> "$GITHUB_OUTPUT"
- name: Container Registry Login
uses: docker/login-action@v2
with:
registry: ${{ steps.registry.outputs.registry }}
username: ${{ gitea.actor }}
password: ${{ secrets.PKG_WRITE_TOKEN }}
- name: Code Checkout
uses: actions/checkout@v4
- name: Record version and Delete Unnecessary files
run: |
echo ${GITHUB_SHA::8} > VERSION
rm -rf .git* tests/ storage/app/test/
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
push: true
tags: "${{ steps.registry.outputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.VERSIONARCH }}"
manifest:
name: Final Docker Image Manifest
runs-on: docker-x86_64
container:
image: docker:dind
privileged: true
needs: [build]
steps:
- name: Environment Setup
run: |
# If we have a proxy use it
if [ -n "${HTTP_PROXY}" ]; then echo "HTTP PROXY [${HTTP_PROXY}]"; sed -i -e s'/https/http/' /etc/apk/repositories; fi
# Some pre-reqs
apk add git curl nodejs
# Start docker
( dockerd --host=tcp://0.0.0.0:2375 --tls=false & ) && sleep 3
- name: Registry FQDN Setup
id: registry
run: |
registry=${{ github.server_url }}
echo "registry=${registry##http*://}" >> "$GITHUB_OUTPUT"
- name: Container Registry Login
uses: docker/login-action@v2
with:
registry: ${{ steps.registry.outputs.registry }}
username: ${{ gitea.actor }}
password: ${{ secrets.PKG_WRITE_TOKEN }}
- name: Build Docker Manifest
run: |
docker manifest create ${{ steps.registry.outputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.VERSION }} \
${{ steps.registry.outputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.VERSION }}-x86_64
#${{ steps.registry.outputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.VERSION }}-arm64
docker manifest push --purge ${{ steps.registry.outputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.VERSION }}

19
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,19 @@
image: docker:latest
stages:
- build
variables:
VERSION: latest-${ARCH}
CACHETAG: build-${ARCH}
DOCKER_HOST: tcp://docker:2375
services:
- docker:dind
before_script:
- docker info
- docker version
- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
include: .gitlab-docker.yml

16
.gitlab-docker.yml Normal file
View File

@@ -0,0 +1,16 @@
armv7l:build:
variables:
ARCH: armv7l
stage: build
image: docker:latest
script:
- if [ -f init ]; then chmod 500 init; fi
- ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || echo "true"
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
tags:
- docker
- armv7l
only:
- armv7l

View File

@@ -1,11 +1,11 @@
# NAME leenooks/sbbs
# VERSION latest
FROM debian:bullseye-slim
FROM debian:buster-slim
# Base utilities
RUN apt-get update \
&& apt-get install -yqq curl supervisor procps less zip unzip arj unrar-free lhasa arc logrotate cron \
&& apt-get install -yqq curl supervisor procps less zip unzip arj unrar-free lhasa arc logrotate cron libnspr4 \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -13,31 +13,32 @@ RUN apt-get update \
# Set the default timezone for the container
RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
# Other Utilities
#RUN echo "deb http://deb.debian.org/debian stretch main contrib" > /etc/apt/sources.list.d/contrib.list
#RUN apt-get update \
# && apt-get install -yqq dosemu \
# && sed -ie 's#^lredir \(.*\)/media/cdrom#rem &#' /etc/dosemu/freedos/autoexec.bat \
# && apt-get -y autoremove \
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Add in Leenooks' apt repository
RUN curl -sL http://apt.leenooks.net/setup.sh | DISTRO=buster bash
# Add ZeroTier
RUN echo "deb [trusted=yes] http://download.zerotier.com/debian/buster buster main" > /etc/apt/sources.list.d/zerotier.list
# Leenooks Utils
RUN apt-get update \
&& apt-get install -yqq zerotier-one \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Build SBBS
RUN apt-get update \
&& apt-get install -yqq git build-essential autoconf2.13 libnspr4-dev libncurses5-dev libncursesw5-dev libarchive-dev wget python2.7 pkgconf libcap2-bin sudo libarchive13 libnspr4 \
&& apt-get install -yqq git build-essential libnspr4-dev libncurses5-dev libncursesw5-dev libarchive-dev cvs wget pkgconf libcap2-bin sudo libarchive13 \
&& mkdir /opt/sbbs && cd /tmp \
&& wget https://gitlab.synchro.net/main/sbbs/-/raw/master/install/install-sbbs.mk \
&& git clone https://gitlab.synchro.net/main/sbbs.git /opt/sbbs/repo \
&& cd /tmp \
&& make -f install-sbbs.mk RELEASE=1 NO_X=1 SBBSDIR=/opt/sbbs \
&& wget https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/install/GNUmakefile \
&& make RELEASE=1 NO_X=1 SBBSDIR=/opt/sbbs install \
&& rm -rf /opt/sbbs/3rdp /opt/sbbs/src \
&& mv /opt/sbbs/ctrl /opt/sbbs/ctrl.orig \
&& mv /opt/sbbs/text /opt/sbbs/text.orig \
&& mv /opt/sbbs/xtrn /opt/sbbs/xtrn.orig \
&& mv /opt/sbbs/web /opt/sbbs/web.orig \
&& mkdir /opt/sbbs/nodes.orig && mv /opt/sbbs/node[1-5] /opt/sbbs/nodes.orig \
&& find /opt/sbbs -name CVS -type d -exec rm -rf {} + \
&& SUDO_FORCE_REMOVE=yes apt-get -y purge git build-essential autoconf2.13 libnspr4-dev libncurses5-dev libarchive-dev libncursesw5-dev wget pkgconf libcap2-bin sudo \
&& SUDO_FORCE_REMOVE=yes apt-get -y purge git build-essential libnspr4-dev libncurses5-dev libarchive-dev libncursesw5-dev cvs wget pkgconf libcap2-bin sudo \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /opt/sbbs/repo \
@@ -59,14 +60,12 @@ COPY start.sh ${SBBSEXEC}/
COPY doorparty.js ${SBBSEXEC}/
COPY main.cnf /opt/sbbs/ctrl.orig/
VOLUME [ "/opt/sbbs/data","/opt/sbbs/ctrl","/opt/sbbs/fido","/opt/sbbs/mods","/opt/sbbs/text","/opt/sbbs/web" ]
VOLUME [ "/var/lib/zerotier-one" ]
VOLUME [ "/opt/sbbs/data","/opt/sbbs/ctrl","/opt/sbbs/fido","/opt/sbbs/mods","/opt/sbbs/text" ]
COPY logrotate.d /etc/logrotate.d/
RUN chmod 644 /etc/logrotate.d/*
COPY supervisord.d /etc/supervisor/conf.d/
COPY docker/init-docker /sbin/init-docker
ENTRYPOINT [ "/sbin/init-docker" ]
# Our ndoes are in ../nodes/node[0-9]
RUN sed -i -e 's#=../node\([0-9]\+\)/#=../nodes/node\1/#' /opt/sbbs/ctrl.orig/main.ini
COPY init /sbin/init
ENTRYPOINT [ "/sbin/init" ]

View File

@@ -1,12 +1,11 @@
#!/bin/bash
export PIDDIR=${PIDDIR:-/var/run}
export SBBSCTRL=/opt/sbbs/ctrl
PIDFILE=${PIDDIR}/sbbs.pid
PIDFILE=/run/sbbs.pid
# Proxy signals
function kill_app(){
kill $(cat ${PIDFILE})
kill $(cat ${SBBS_PID})
exit 0 # exit okay
}
trap "kill_app" SIGINT SIGTERM
@@ -19,10 +18,10 @@ echo "* SBBS PID [${SBBS_PID}]"
if [ -n ${SBBS_PID} ]; then
while [ -d /proc/${SBBS_PID} ]; do
NAME=$(basename $(cat /proc/${SBBS_PID}/cmdline |awk 'BEGIN { FS = "\0" } ;{print $(NF-2)}'))
NAME=$(cat /proc/${SBBS_PID}/cmdline |awk -F\00 '{print $1}')
#echo "* SBBS NAME [${NAME}]"
if [ "${NAME}" != "sbbs" -a "${NAME}" != "/mnt/lima-rosetta/rosetta" ]; then
if [ "${NAME}" != "sbbs" ]; then
echo "! Name not matching? [${NAME}]"
break;
fi

View File

@@ -1,7 +1,3 @@
[program:sbbs]
command=/opt/sbbs/exec/start.sh
stopwaitsecs=60
startsecs=30
startretries=2
environment=SBBSCTRL="/opt/sbbs/ctrl"
directory=/opt/sbbs