Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:20.10
RUN apt update
RUN apt install -y build-essential bison gperf cmake libsqlite3-dev libaspell-dev libpcre3-dev nettle-dev g++ libcurl4-openssl-dev libargon2-dev

WORKDIR /toaststunt
COPY src /toaststunt/src/

COPY CMakeLists.txt /toaststunt/
COPY CMakeModules /toaststunt/CMakeModules


WORKDIR /toaststunt/
RUN pwd ; mkdir build && cd build && cmake ../
RUN cd /toaststunt/build && make -j2

# A special restart which output on stdout is needed for docker
COPY docker_restart.sh /toaststunt/build/
EXPOSE 7777
ENTRYPOINT cd /toaststunt/build/ ; ./docker_restart.sh /cores/$CORE_TO_LOAD
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '2'

services:
dev_server:
image: toaststunt:2.7.0_10
build:
context: .
# Server port can be re-mapped outside container below
# Just change the left side of the following line:
ports:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Server port should be configurable via environment variables.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Server port can be re-mapped outside container using the ports syntax.
See comments in the new commit ea4ca08

- 7777:7777
environment:
# OTHER EXAMPLES: CORE_TO_LOAD=test-cores/toastcore
- CORE_TO_LOAD=Minimal
volumes:
- ./:/cores
41 changes: 41 additions & 0 deletions docker_restart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh

# Copyright (c) 1992, 1994, 1995, 1996 Xerox Corporation. All rights reserved.
# Portions of this code were written by Stephen White, aka ghond.
# Use and copying of this software and preparation of derivative works based
# upon this software are permitted. Any distribution of this software or
# derivative works must comply with all applicable United States export
# control laws. This software is made available AS IS, and Xerox Corporation
# makes no warranty about the software, its performance or its conformity to
# any specification. Any person obtaining a copy of this software is requested
# to send their name and post office or electronic mail address to:
# Pavel Curtis
# Xerox PARC
# 3333 Coyote Hill Rd.
# Palo Alto, CA 94304
# Pavel@Xerox.Com

if [ $# -lt 1 -o $# -gt 2 ]; then
echo 'Usage: restart dbase-prefix [port]'
exit 1
fi

if [ ! -r $1.db ]; then
echo "Unknown database: $1.db"
exit 1
fi

if [ -r $1.db.new ]; then
mv $1.db $1.db.old
mv $1.db.new $1.db
rm -f $1.db.old.Z
compress $1.db.old &
fi

if [ -f $1.log ]; then
cat $1.log >> $1.log.old
rm $1.log
fi

echo `date`: RESTARTED >> $1.log
./moo $1.db $1.db.new $2 2>&1
33 changes: 21 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@

ToastStunt is a fork of the LambdaMOO / Stunt server. It has a number of features and improvements that were found useful while developing [Miriani](https://www.toastsoft.net) and [ChatMud](https://www.chatmud.com/), a mostly complete list of which can be found below.

* [Features](#features)
* [ChangeLog](ChangeLog.md)
* [Build Instructions](#build-instructions)
* [Debian/Ubuntu](#debian-ubuntu)
* [REL/CentOS](#rel-centos)
* [Gentoo](#gentoo)
* [FreeBSD](#freebsd)
* [macOS](#macos)
* [Function Documentation](https://github.com/lisdude/toaststunt-documentation)
* [ToastCore](https://github.com/lisdude/toastcore)
* [Support and Development](#support-and-development)
* [Stunt Information](README.stunt)
- [ToastStunt](#toaststunt)
- [Features](#features)
- [Build Instructions](#build-instructions)
- [**Docker**](#docker)
- [**Debian/Ubuntu**](#debianubuntu)
- [**REL/CentOS**](#relcentos)
- [**Gentoo**](#gentoo)
- [**FreeBSD**](#freebsd)
- [**macOS**](#macos)
- [**Notes**](#notes)
- [Argon2](#argon2)
- [CMake Build Options](#cmake-build-options)
- [Stuck seeding from /dev/random](#stuck-seeding-from-devrandom)
- [Login screen not showing](#login-screen-not-showing)
- [Support and Development](#support-and-development)

## Features

Expand Down Expand Up @@ -135,6 +138,12 @@ ToastStunt is a fork of the LambdaMOO / Stunt server. It has a number of feature
- Allow handling of SIGUSR signals in the database with `#0:handle_signal()`

## Build Instructions

### **Docker**
A Docker image based on Ubuntu 20 is provided.
You must init git submodules because the image will build argon2 from the provided sources (see below).


### **Debian/Ubuntu**
```bash
apt install build-essential bison gperf cmake libsqlite3-dev libaspell-dev libpcre3-dev nettle-dev g++ libcurl4-openssl-dev
Expand Down