Skip to content

Vanilla PHP application written in the OOP paradigm & MVC design pattern with a relational database (MySQL). Styling: Bootstrap. Deployment: Docker, NameCheap, DigitalOcean, Certbot (Let's Encrypt) & SMTP2GO. Development: VSCode + Remote - SSH extension.

License

Notifications You must be signed in to change notification settings

gusalbukrk/simpletables

Repository files navigation

Run

  • ./run.sh <password> = start app
    • script takes 1 argument — MySQL root user password
  • docker compose down = stop app

Deploy

Register a domain

Set up hosting

  • create an account on DigitalOcean
  • create a project and a SSH key on settings
  • create a droplet inside the project created previously and select the SSH key created on the previous step as the authentication method
  • update nameservers on Namecheap to point to DigitalOcean as the DNS provider (instructions)
    • NOTE: later you will revert to use Namecheap but for now using DigitalOcean is necessary to easily issue a SSL certificate

Initial server configuration

Issue Let's Encrypt certificate

  • enable SSL using Let's Encrpyt
    • NOTE: at section 'Step 3 - Issuing a Certificate', instead of using one of the commands provided as example, use instead (source): sudo certbot certonly --dns-digitalocean --dns-digitalocean-credentials ~/certbot-creds.ini -d simpletables.xyz -d '*.simpletables.xyz' to acquire a wildcard certificate
    • NOTE: during this step you'll need to create a DigitalOcean token (instructions]
    • NOTE: DigitalOcean must be the DNS provider because we're using the certbot-dns-digitalocean plugin, if using any other provider you will get the error Unable to determine base domain for simpletables.xyz

Set up a free email

  • until now we used DigitalOcean as the DNS provider, however Namecheap offers functionalities DigitalOcean doesn't because of that we'll switch to Namecheap (NOTE: you'll need to switch back to DigitalOcean when it's time to renew the SSL certificate)
    • on DigitalOcean, delete domain
    • on Namecheap, remove DigitalOcean's nameservers by choosing 'Namecheap BasicDNS' and adding the following records:
      • type: A record, host: @, value: droplet ip
      • type: A record, host: *, value: droplet ip
  • configure Namecheap to forward emails sent to a custom domain address (e.g. [email protected]) to a regular email (e.g. [email protected]) — at 'REDIRECT EMAIL' section add the following record (source):
  • to be able to send emails with your custom domain, you must set up a SMTP server — sign up to SMTP2GO with a custom domain email and follow given instructions

About

Vanilla PHP application written in the OOP paradigm & MVC design pattern with a relational database (MySQL). Styling: Bootstrap. Deployment: Docker, NameCheap, DigitalOcean, Certbot (Let's Encrypt) & SMTP2GO. Development: VSCode + Remote - SSH extension.

Topics

Resources

License

Stars

Watchers

Forks