- These steps were successfully tested on:
- macOS (10.15.3), ubuntu (22.04)
- Docker (19.03.5, 20.10.20)
The following tools should be available on the system.
- docker
Prepare The s3 credential file (s3cfg
) needed for LogRotate. It should like so:
[default]
access_key = REPLACE_ME
secret_key = REPLACE_ME
git clone https://github.com/brain-bican/purl.brain-bican.org.git
cd purl.brain-bican.org
docker build -f docker/Dockerfile -t purl:latest .
docker image list | grep purl
Run interactively and access the web server using http://localhost.
Be sure to specify the absolute path to s3 credentials (s3cfg
).
docker run --name purl -v REPLACE_ME:/opt/credentials/s3cfg -p 80:80 -it purl:latest /bin/bash
sudo cat /opt/credentials/s3cfg # Make sure crendetials were mounted properly
ps -ef # Make sure apache is running
Stop Container.
docker stop purl
Delete Container.
docker rm -f purl
Delete Image.
docker image rm purl:latest
Run tests and safe-update.
cd /var/www/purl.brain-bican.org
sudo make all test
sudo make safe-update
Test LogRotate. Use -f option to force log rotation.
sudo cat /opt/credentials/s3cfg
sudo logrotate -v -f /etc/logrotate.d/apache2