enigma-bbs/docs/_docs/installation/docker.md

80 lines
3.3 KiB
Markdown
Raw Permalink Normal View History

---
layout: page
title: Docker
---
2022-08-19 06:03:25 +00:00
> :warning: **You'll need Docker installed before going any further. How to do so are out of scope of these docs, but you can find full instructions
2021-02-19 19:06:07 +00:00
for every operating system on the [Docker website](https://docs.docker.com/engine/install/).**
## Quick Start
2022-08-19 06:03:25 +00:00
Prepare a folder where you are going to save your bbs files.
1. Generate some config for your BBS: \
You can perform this step from anywhere - but make sure to consistently run it from the same place to retain your config inside the docker guest.
```bash
docker run -it -p 8888:8888 \
2022-02-03 13:51:21 +00:00
--name "ENiGMABBS" \
-v "$(pwd)/config:/enigma-bbs/config" \
-v "$(pwd)/db:/enigma-bbs/db" \
-v "$(pwd)/logs:/enigma-bbs/logs" \
-v "$(pwd)/filebase:/enigma-bbs/filebase" \
-v "$(pwd)/art:/enigma-bbs/art" \
-v "$(pwd)/mods:/enigma-bbs/mods" \
-v "$(pwd)/mail:/mail" \
2022-02-03 13:55:33 +00:00
enigmabbs/enigma-bbs:latest
```
2022-08-19 06:03:25 +00:00
2. Run it: \
You can use the same command as above, just daemonize and drop interactiveness (we needed it for config but most of the time docker will run in the background)
```bash
docker run -d -p 8888:8888 \
2022-01-29 19:19:58 +00:00
--name "ENiGMABBS" \
-v "$(pwd)/config:/enigma-bbs/config" \
-v "$(pwd)/db:/enigma-bbs/db" \
-v "$(pwd)/logs:/enigma-bbs/logs" \
-v "$(pwd)/filebase:/enigma-bbs/filebase" \
-v "$(pwd)/art:/enigma-bbs/art" \
-v "$(pwd)/mods:/enigma-bbs/mods" \
-v "$(pwd)/mail:/mail" \
2022-02-03 13:55:33 +00:00
enigmabbs/enigma-bbs:latest
2022-08-19 06:03:25 +00:00
```
### Restarting and Making changes\
If you make any changes to your host config folder they will persist, and you can just restart ENiGMABBS container to load any changes you've made.
2022-01-29 19:19:58 +00:00
```docker restart ENiGMABBS```
2022-07-16 18:35:39 +00:00
> :bulb: Configuration will be stored in `$(pwd)/enigma-bbs/config`.
2022-07-16 18:35:39 +00:00
> :bulb: Windows users - you'll need to switch out `$(pwd)/enigma-bbs/config` for a Windows-style path.
2020-08-22 19:26:24 +00:00
2021-02-19 19:06:07 +00:00
## Volumes
2022-07-16 18:35:39 +00:00
Containers by their nature are ephermeral. Meaning, stuff you want to keep (config, database, mail) needs
2021-02-19 19:06:07 +00:00
to be stored outside of the running container. As such, the following volumes are mountable:
| Volume | Usage |
|:------------------------|:---------------------------------------------------------------------|
| /enigma-bbs/art | Art, themes, etc |
| /enigma-bbs/config | Config such as config.hjson, menu.hjson, prompt.hjson, SSL certs etc |
| /enigma-bbs/db | ENiGMA databases |
| /enigma-bbs/filebase | Filebase |
| /enigma-bbs/logs | Logs |
| /enigma-bbs/mods | ENiGMA mods |
| /mail | FTN mail (for use with an external mailer) |
## Building your own image
Customising the Docker image is easy!
1. Clone the ENiGMA-BBS source.
2. Build the image
2022-08-19 06:03:25 +00:00
```bash
docker build -t enigmabbs -f ./docker/Dockerfile .
```
3. Run the image
```bash
docker run -it -p 8888:8888 --name "ENiGMABBS" -v "$(pwd)/config:/enigma-bbs/config" -v "$(pwd)/db:/enigma-bbs/db" -v "$(pwd)/logs:/enigma-bbs/logs" -v "$(pwd)/filebase:/enigma-bbs/filebase" -v "$(pwd)/art:/enigma-bbs/art" -v "$(pwd)/mods:/enigma-bbs/mods" -v "$(pwd)/mail:/mail" enigmabbs
2022-08-19 06:03:25 +00:00
```