Meredith Monk / House Foundation Collective Access setup.
Based on these Dockerfiles, but using docker-compose for managing services.
- Set up Compute Engine VM with Ubuntu
- Go to VPC Network -> External IP addresses, and set the IP address for the VM you just created as "Static"
- Create a MySQL instance. On the "Overview" page, follow the instructions to "Connect from a Compute Engine VM Instance". Make sure both the Compute Engine VM and your development machine are whitelisted for access to the database.
- Download
.env
file or populate one with the connection information for the new database. - SSH into the compute engine vm. Install docker and docker compose based on
these instructions.
Also execute
sudo systemctl enable docker
so that docker starts at boot. - Clone this repo onto the compute engine vm, and copy the
.env
to the project root. - Run the service with
docker-compose up -d
, then attach to the container withdocker exec -it collectiveaccess /bin/bash
, and make sure permissions are set properly for the/var/www/providence/media
directory by executingchown -R www-data /var/www/providence/media
andchgrp -R www-data /var/www/providence/media
. - Follow instructions here to set up FTP access. I had to delete the RANDFILE line in /usr/lib/ssl/openssl.conf in order to generate a cert. Set the local_root to the media directory in this repo, and add the ftpuser to the www-data group. I also had to remove the comments from the ends of the config file lines provided in this example.
We have the background media processing queue enabled so on the server, you will need to use crontab to configure a job to run every five minutes to process media e.g.:
*/1 * * * * /home/ptsd/meredith-monk-collectiveaccess/processQueue.sh 2>&1 | logger -t capq
If an error is showing up, can ssh into the vm and remove/recreate the docker container:
gcloud config set project meredith-monk-website
gcloud beta compute --project "meredith-monk-website" ssh --zone "us-central1-a" "collectiveaccess"
-
Resize the disk in the GCP console.
-
SSH into the server (see above). Change to the
ptsd
user where the project is installed, and cd to that user's home directory:
sudo su ptsd
cd /home/ptsd/meredith-monk-collectiveaccess
- View disk space available to confirm disk space exhausted:
df -Th
sudo lsblk
- Stop the service in this project directory:
docker-compose down
- Grow the partition to use the disk space show with
lsblk
sudo growpart /dev/sda 1
- Grow the filesystem:
sudo resize2fs /dev/sda1
- Confirm the filesystem now has the full space allotted in step 1, and restart the docker containers:
docker-compose up -d