Compare commits

..

6 Commits

2 changed files with 25 additions and 42 deletions

View File

@@ -9,7 +9,7 @@ ARG RESTY_DEB_VERSION="=1.27.1.2-1~bookworm1"
ARG RESTY_LUAROCKS_VERSION="3.12.2"
RUN apt-get update && apt-get install -y \
python3-pygments lua-inotify wget && \
python3-pygments lua-inotify wget curl tar make && \
wget -q -O $pkgname $pkgurl && dpkg -i $pkgname && rm $pkgname
RUN wget -qO - https://openresty.org/package/pubkey.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/openresty-keyring.gpg \

View File

@@ -1,26 +1,23 @@
## requirements
* Docker
`pandoc` utility must be installed
## up and running
- Debian Bookworm:
### build container image
$ apt-get update && apt-get install -y pandoc
## start default openresty
1. Run `docker run --rm -it --init -w /opt -v $PWD:/opt -p 80:80 openresty/openresty:1.27.1.2-0-bookworm-buildpack`
2. Visit `localhost` in web browser.
## start a custom site
### build docker image
$ make image-build
### build site
$ make build
### start dev server
$ make serve
Visit `localhost:8080` in web browser
## getting around
### rebuild the container image
### rebuild an existing docker image
$ make image-rm image-build
@@ -30,11 +27,9 @@ Visit `localhost:8080` in web browser
### add an index page
#### create the file
$ docker run --rm -w /opt/app -v $PWD:/opt/app miti.sh sitegen page /opt/app index
#### add to `site.moon`
### add to `site.moon`
add "index.md"
@@ -57,10 +52,20 @@ Visit `localhost:8080` in web browser
}
}
### build site
$ make build
### build a single file
$ make build file=index.html
### start dev server
$ make serve
Visit `localhost:8080` in web browser
### start a shell
$ make shell
@@ -96,20 +101,6 @@ SSH into server admin account and run:
$ cd www
$ dehydrated --config config -c
Then restart the OpenResty service:
$ sudo service openresty restart
#### automate TSL cert renewal with cron
Open root's crontab:
$ sudo crontab -e
Add the following line, then save and exit:
19 4 1 * * /usr/bin/dehydrated --config /var/www/config --cron >/dev/null 2>&1 && /usr/bin/systemctl restart openresty.service
## gotchas
### What is error `cosmo failed: [string "..."]:62: cannot resume dead coroutine`?
@@ -133,11 +124,3 @@ Delete your `.sitegen_cache` file.
* use sitecache with pandoc renderer
* draft documents
* treesitter highlighting for moonscript
## todo
* destroy a target ship by shooting them with the cannon
* make corners not bouncy (leave them bouncy for now?)
* wall entities
* ship-ship collision
* make ssh command?