+++ date = "2019-12-02T06:48:51+00:00" publishdate = "2023-12-29T07:08:55+00:00" title = "Trying Out This Website" slug = "trying-out-this-website" author = "Thedro" tags = ["web"] type = "posts" summary = "Lately, there have been a few inquiries about deploying the source code of my website." draft = "" syntax = "1" toc = "" updated = "" +++ {{< image source="/images/trying-out-this-website.png" title="Demo Version" >}} Demo version of this website {{< /image >}} Lately, there have been a few inquiries about deploying the [source code](https://www.thedroneely.com/git/thedroneely/thedroneely.com) of my website. Unfortunately for my own {{< sidenote mark="convenience," set="left" >}}Less configuration to think about.{{< /sidenote>}} very few of my resources are deployed directly or entirely with [Docker.](https://www.docker.com/) You can however get an instance of this website running very quickly with linux {{< sidenote mark="containers." set="right" >}}My personal deployment strategy is mostly ad hoc, so a linux container is the easiest way for me to deliver a demo of the source code.{{< /sidenote>}} [Installing](https://linuxcontainers.org/lxc/getting-started/#installation) and running `lxc` on your system should theoretically be the hardest part. To get this up and running, create a container and change to its working directory. ```shell lxc-create --name app --template download -- --dist alpine --release 3.14 --arch amd64 --keyserver hkp://keyserver.ubuntu.com cd /var/lib/lxc/app ``` {{< sidenote mark="Remove" set="left" >}}We can generate an empty container with the command `lxc-create -n empty -t none`, but the generated config file will be empty too.{{< /sidenote>}} the contents of the container file system. The `rootfs` will be replaced with the website's file system. ```shell rm -rf rootfs/* ``` Download the website [here,](https://www.thedroneely.com/download/rootfs.tar.gz) verify its [checksum,](https://www.thedroneely.com/download/rootfs.tar.gz.sha256) and extract the contents into `rootfs`. ```shell wget https://www.thedroneely.com/download/rootfs.tar.gz tar --numeric-owner -xzvf rootfs.tar.gz -C rootfs/ ``` Start the website and get its `IP` address. ```shell lxc-start -n app lxc-ls -f ``` The output should look something like the following. ```shell NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED app RUNNING 0 - x.x.x.x - false ``` [Cockpit CMS](https://getcockpit.com/) can be accessed at `http://x.x.x.x/cockpit`. [Isso's](https://posativ.org/isso/) administration page can be accessed at `http://x.x.x.x/isso/admin`. The default {{< sidenote mark="credentials" set="right" >}}Disclaimer: You are responsible for securing your stack.{{< /sidenote>}} are listed below. ```shell # Cockpit CMS default credentials Username: admin Password: admin # Isso default credentials Password: changethis ``` If this was too long to read, then see the condensed version below. ```shell lxc-create -n app -t download -- --dist alpine --release 3.10 --arch amd64 cd /var/lib/lxc/app rm -rf rootfs/* wget https://www.thedroneely.com/download/rootfs.tar.gz tar --numeric-owner -xzvf rootfs.tar.gz -C rootfs/ lxc-start -n app lxc-ls -f ```