Is a webapp to help you discover and share cool spots in cities. These guides are useful for backpackers, digital nomads, and people new in town that are keen to discover cool things.
These instructions are for a Digital Ocean Ubuntu droplet though they are interchangeable for other GNU Linux systems.
The following instructions are meant to provision a Digital Ocean droplet. Feel free to use your favorite cloud or bare metal and skip to the next section.
Install Terraform and create a ssh key pair to access the droplet.
Edit the file deploy/infrastructure/terraform.tfvars
and change public_key
to the public key you've created. Once
again, feel free to change the defaults. Then proceed to create the infra.
cd deploy/infrastructure
terraform apply
# verify changes and if correct, type `yes`
The output of the command is the IP of the droplet. Save it, we'll point our domain to it later.
Check out the hardening guide for instructions on how to harden sshd, setup a firewall with ufw, and setup fail2ban.
Skip this section if you are using the provided droplet this configuration is already taken care of.
Login as root on your server and create a user for the app.
# adduser cityguide
# usermod -aG sudo cityguide
# su cityguide
# sudo apt update #verify the user was added to sudoers
Install:
- Modify
cityguide/deploy/Caddyfile
to point to your domain and also to your email for HTTPS cert validation. - Copy(using
scp
or copy/paste) thedocker-compose.yml
andCaddyfile
.
$ scp cityguide/deploy/docker-compose.yml cityguide@<YOUR_SERVER>:/home/cityguide
$ scp cityguide/deploy/Caddyfile cityguide@<YOUR_SERVER>:/home/cityguide
ssh
into your server as thecityguide
user and navigate homecd ~
.- run
docker compose up -d
- Add an A record to your domain that points to the IP address of the droplet that we saved earlier.
- Open your browser and visit the site.