How to operate the website known as Hive.
Add the deployment site to your ~/.ssh/config
:
cat >>~/.ssh/config <<EOF Host hivesite Hostname (you know it) User (you know it) ForwardX11 no ForwardAgent no Compression yes EOF
Recursively clone the repo:
git clone --recursive [email protected]:gbenson/hivesite.git cd hivesite
The staging
subdirectory now contains a local copy of what's on
the live site.
The first time the database container starts it will create a local
copy of the live site's database using files in the database
directory. Run the following script to create those files:
./init-database
To force a database reinitialization, do:
docker compose down docker volume rm hivesite_database docker compose up
See the comments in init-database
if you need to create a fresh
backup to initialize from.
Some files need fetching from the live site. Run the following script to fetch them:
./init-webserver
The sources
directory contains the tarballs that were used to
build the gbenson/mediawiki
container image. After testing, the
container's document root is extracted into the staging
directory
and then deployed to the live site using git. To update the site:
- Download any new files you need into
sources
. - Edit
Dockerfile
with any changes you need. - Either build the container image locally
(
docker build --tag=gbenson/mediawiki .
), or just push aX.Y.Z-R
tag to GitHub and let the CI workflow build the image and push it to Docker Hub. - Run
./push-to-staging
to copy everything intostaging
. cd
intostaging
, usegit diff
to make sure everything's as you want it. Go back and make changes if necessary.- Commit your changes, then
git push
them. Thepost-receive
hook on the other end will deploy what you've pushed. cd
out ofstaging
, and commit your changes there.