- Docker Desktop
- Terraform (
brew install terraform
) - Doctl (
brew install doctl
)
This project expects the following repos to be cloned into the same workspace:
roleplay-realm-archive
roleplay-realm-archive-db
# roleplay-realm-archive-infra
./bin/local/db_up.sh
./bin/local/app_up.sh
# roleplay-realm-archive-db
./bin/migrate
This Terraform configuration expects the following resources to already exist:
- A container app registry called "bam"
./bin/deploy/app.sh
./bin/terraform.sh plan
./bin/deploy/infra.sh
# ONLY DO THIS IF YOU WANT TO BLOW EVERYTHING UP
./bin/terraform.sh destroy
Heads up: This assumes you're running these steps in the applied terraform workspace, with outputs available.
./bin/jump/connect.sh
# On jump server, generate ssh key.
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub
# (copy the public key and add it to GitHub)
# Clone database repo
cd /mnt/rra_jump_server_volume
git clone git@github.com:bannmoore/roleplay-realm-archive-db.git
cd roleplay-realm-archive-db
# Run migrations
source ../.env
./bin/jump_setup.sh
./bin/migrate.sh
To run new migrations:
./bin/jump/connect.sh
cd /mnt/rra_jump_server_volume/roleplay-realm-archive-db
git pull
source ../.env
./bin/migrate.sh
If the published image is built on the arm64 platform, it won't work on Digital Ocean. Check it like so:
docker image ls | grep bam
docker inspect <IMAGE_ID> --format '{{.Architecture}}'
This should print out amd64. If not, the image needs to be rebuilt with the --platform=linux/amd64
flag.
If your digitalocean_vpc resource is the first one for a region, it will automatically become the default. In order to run terraform destroy, create another one via the console and set it to default.
- https://tonitalksdev.com/deploying-clojure-like-a-seasoned-hobbyist
- https://slugs.do-api.dev/
- https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-a-registry/#:~:text=Even%20though%20they're%20related,your%20images%20based%20on%20projects
- https://docs.digitalocean.com/products/volumes/how-to/mount/