Dockerized BSDPy
This repo uses Docker and Docker Compose to automate the deployment of BSDPy.
The images in this repo are based on Alpine Linux, keeping the overall size to a minimum.
Note: some of the commands in these guides may require root access to your system. If that is the case, either run the commands while logged in to the root account, or simulate a login to the root account using sudo -i
. Due to the way environment variables are passed on some systems, typing sudo
before each command is not a supported method of running the commands in these guides with root access.
-
Ensure the following are installed on your system:
- Docker
- Docker Compose Warning: installing as a container is not supported.
git
-
Clone this repo to a location on your system. Note: in all of the guides on this page, it is assumed the repo is cloned to
/srv/docker/bsdpy
.git clone https://github.com/ianharrier/docker-bsdpy.git /srv/docker/bsdpy
-
Set the working directory to the root of the repo.
cd /srv/docker/bsdpy
-
Create the
.env
file using.env.template
as a template.cp .env.template .env
-
Using a text editor, read the comments in the
.env
file, and make modifications to suit your environment.vi .env
-
Start BSDPy in the background.
docker-compose up -d
-
Upload your NetBoot images to the
volumes/nbi
subdirectory. If you need to host other files, they can be uploaded to thevolumes/content
subdirectory. NetBoot images are published athttp://<Docker-host-IP>/nbi/
, and other content is published athttp://<Docker-host-IP>/content/
. -
Restart the application stack to fix the file permissions on the uploaded files.
docker-compose restart
Warning: the upgrade process will immediately stop and upgrade the current production environment. The application stack will be unavailable while it is being upgraded.
-
Set the working directory to the root of the repo.
cd /srv/docker/bsdpy
-
Run the upgrade script.
./scripts/app-upgrade.sh
-
Set the working directory to the root of the repo.
cd /srv/docker/bsdpy
-
Remove the application stack.
docker-compose down
-
Delete the repo. Warning: this step is optional. If you delete the repo, all of your BSDPy data, including NetBoot images and other content, will be lost.
rm -rf /srv/docker/bsdpy