app | ||
bootstrap | ||
config | ||
data | ||
database | ||
public | ||
resources/views | ||
routes | ||
storage | ||
.env.example | ||
.gitattributes | ||
.gitignore | ||
artisan | ||
composer.json | ||
composer.lock | ||
package.json | ||
phpunit.xml | ||
README.md | ||
server.php |
Installing vBBS
TL;DR - use docker :)
Figure out where you will install this - can be anywhere, call this $APP_DIR
Setup a MYSQL/MARIADB database
For docker, you can use the mariadb:latest image:
docker run --rm -itd --name=vbbs_db \
-v ${APP_DIR}/database:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=secret -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=database mariadb:latest
Check that docker started OK, it should look something like this (use docker ps
):
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fc2f32aaaa55 mariadb:10.3 "docker-entrypoint.s…" 4 seconds ago Up 3 seconds 3306/tcp vbbs_db
Clone the git repository
mkdir -p ${APP_DIR}/composer
mkdir -p ${APP_DIR}/app
cd ${APP_DIR}/app
git clone http://dev.leenooks.net/bbs/vbbs.git .
(chown -R 33:33 ${APP_DIR}/composer ${APP_DIR}/app dirs if you use my docker image)
** Setup the application cd ${APP_DIR}/app cp .env.example to .env
edit and update the APP_PORT (something above 1024) and DB_* database entries:
APP_PORT=6502
...
DB_CONNECTION=mysql
DB_HOST=vbbs_db
DB_PORT=3306
DB_DATABASE=database
DB_USERNAME=user
DB_PASSWORD=password
Setup PHP
You're PHP will need SOCKETS and PCNTL and you'll need COMPOSER as well installed.
If you are using docker, you can use my PHP image, which has all three.
Pre Setup
You need to run composer, and migrate to test connectivity to the database and seed it - you can do that in a single step
docker run --rm -u www-data -itd --link=vbbs_db --name=vbbs \
-v ${APP_DIR}/app/php:/var/www/html \
-v ${APP_DIR}/composer:/var/www/.composer/cache \
--entrypoint=/bin/bash registry.leenooks.net/leenooks/php:7.2-fpm-plus -c "composer install; php artisan migrate --seed"
Start
Now, run the app, you need to map it from the host port (can be anything), into the container onto APP_PORT that you specified above.
For example, if you use 6502 for both:
docker run --rm -u www-data -itd --link=vbbs_db --name=vbbs -p 6502:6502 \
-v ${APP_DIR}/app/php:/var/www/html \
-v ${APP_DIR}/composer:/var/www/.composer/cache \
--entrypoint=/bin/bash registry.leenooks.net/leenooks/php:7.2-fpm-plus -c "php artisan server"
If you want to watch is on the console, you can remove the d
from the option or use docker attach
If it started OK, you should see it running (use docker ps
):
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9916ee39d9b7 registry.leenooks.net/leenooks/php:7.2-fpm-plus "/bin/bash -c 'php a…" 13 minutes ago Up 13 minutes 22/tcp, 9000/tcp, 0.0.0.0:6502->6502/tcp vbbs
Voila!
Use your videotex terminal and connect to your host on the APP_PORT that you used (eg: 6502)