Skip to content

alexanderpepper/alexpepper.net

Repository files navigation

AlexPepper.net

Developing locally

With Docker:

  • Run make build to build the image
  • Run make dev to run the server and front end in dev mode
    • For some reason hot reloading isn't working, browser refresh required.

Without Docker:

  • Run make install to install all dependencies
  • Run make api to run the API on port 3000
  • Run make ui to run the UI on port 8080

Production deployment using Docker:

Docker config based on the article How To Secure a Containerized Node.js Application with Nginx, Let's Encrypt, and Docker Compose

  1. Configure DNS to point to the server's IP
  2. On the server, replace the contents of nginx.conf with the following:
server {
        listen 80;
        listen [::]:80;

        root /var/www/html;
        index index.html index.htm index.nginx-debian.html;

        server_name alexpepper.net www.alexpepper.net;

        location / {
                proxy_pass http://api:8080;
        }

        location ~ /.well-known/acme-challenge {
                allow all;
                root /var/www/html;
        }
}
  1. Run sudo make deploy to run the application and request certificates.
  2. Verify that the certificates were generated correctly.
  3. Run sudo make stop to take the application down.
  4. Undo changes to nginx.conf to run on HTTPS.
  5. Run sudo make deploy again to deploy the application with SSL.
  6. Sometimes, in order to pick up front-end changes, the web-root volume need to be deleted:
docker volume rm alexpeppernet_web-root

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published