This project includes files to set up all external services needed by the LumenVox Containers software stack, using docker compose.
# Get compose file
git clone https://github.com/lumenvox/external-services.git
cd external-services
# Load NFS modules
sudo modprobe nfs
sudo modprobe nfsd
# Set up NFS directory
sudo mkdir /data
sudo chown -R $(whoami): /data
# Get user's UID
id -u
# Update exports.txt to use UID from previous step
nano exports.txt
# Start services
docker-compose up -dThis is intended to run on a Linux machine. The host machine should have Docker installed, and it should have access to the Compose tool.
For the NFS server to work, the following modules must be loaded:
- nfs
- nfsd
You can find the status of these modules by checking the output of lsmod:
lsmod | grep nfsIf either module is not loaded, it should be loaded by running the following:
sudo modprobe <module>To ensure that these modules are loaded upon reboot, you can create a file
/etc/modules-load.d/nfs.conf with the following content:
nfs
nfsd
The NFS container makes use of port 111, which may be used by other processes. If this is the case, you may see an error when creating the NFS container:
Error starting userland proxy: listen tcp4 0.0.0.0:111: bind: address already in use
If this error is encountered, you can check which process is causing the conflict by running the following:
sudo netstat -tulpn | grep 111One culprit found during testing was rpcbind. If this is true for you, this
can be solved by stopping and disabling the service:
sudo systemctl --now disable rpcbindThe NFS image will export a directory on your host machine. By default, this is
the /data directory, but this can be changed. Regardless of location, you
should verify the following:
- The directory exists.
- If not, run
sudo mkdir /data
- If not, run
- The directory is owned by the user that will run docker.
- If not, run
sudo chown -R $(whoami): /data
- If not, run
Once the directory has been set up, edit exports.txt, replacing 1002 with
your user's UID. This can be obtained by running id -u.
While in the process of setting up dedicated servers for the external services,
you may want to run the stack without all services. If you would like to stop
running a service, you can comment out its section by placing a # at the start
of each line. If the service is not the NFS, you should also comment out the
relevant volume at the bottom of the file.
Passwords and other credentials can be managed in the .env file. The file is
provided with some defaults which should be changed before moving to production.
The NFS container will export the directory named in docker-compose.yaml. This
can be seen in the volumes section of the nfs entry. The default entry is:
- '/data:/data:rw'The leftmost /data determines the location on the host machine; this can be
configured at will. Be sure that the directory already exists, and be sure that
it is owned by the user that will run docker. This can be accomplished by
running the following:
sudo chown -R $(whoami): /dataThe rightmost /data determines the mount point on the NFS image. There is
little reason to change this, but if you do change it, make sure to update
exports.txt.
The rw specifies read/write, which should not be changed.
Further configuration of the individual services may be possible, but that is
currently beyond the scope of this project. If you would like more information,
docker-compose.yaml includes links to the main pages for each image.
To start the services, navigate to the project root and run the following:
docker-compose up -dTo stop the services, navigate to the project root and run the following:
docker-compose down