# Deploying

### Your Dumb Ideas

### with Dokku

## What is Deploying?

This is mostly for web applications and websites</asides>
Publishing an application to be used.

## A Brief History of Deploying

## Shared Web Hosting

cPanel had a file manager you could upload your PHP files to!

## FTP

Then we evolve. Connect to your cPanel instance with FTP!

## More Advanced Shared Hosting

Small mention of WHM and managing many installations of cPanel!

## Git

1. `$ ssh root@domain`
2. `$ cd /usr/var/www`
3. `$ git pull`

I have never actually used Github professionally, oddly enough.

## Modern Build & Deployment Systems

## AWS

## Deployment as a Service

- Heroku
- Vercel

## Dokku

### (finally)

## But first...

## VPS

- Easiest way to get a public IP
- Cheap, modest servers, running Linux (Debian)
  - Linode
  - DigitalOcean
- Root access!

Virtual Private Servers, super easy for getting off the ground quickly

## Domains

- Buy a domain
- Update the Nameservers
- Add A Record for the IP to the VPS

## Dokku

- Open Source, Self-Hosted, Platform as a Service
- Your very own Heroku

I have never used Heroku
I have never used Heroku...

## Set Up

- Install Dokku on VPS
- Setting up Domains
- Set up Dokku remote in your Git repo
- Have a global `Dockerfile` in your code
- `$ git push -u dokku main`

> Buildpacks are responsible for transforming deployed code into a slug, which can then be executed on a dyno.

That feels made up.

## Real Life Example

Show deploying the chat application.