| Age | Commit message (Collapse) | Author |
|
* Move the `make run` target into the project root's Makefile
* Update paths in lighttpd.conf to correspond to its new location
|
|
Needs the project root in order to access `production-config/env`.
|
|
For whatever reason, the environment variables in my `.htaccess` weren't
getting passed to my FastCGI executables on my production server.
Wasn't sure how to get them passed to the programs, so decided instead
to compile the env variables into the binaries.
To do that, we source the environment file before building the release
builds in the Docker container.
|
|
My production server is on Ubuntu 14.04, but I was building the FastCGI
executables with Debian Stretch.
Discovered the problem like this:
$ ./fulfillment.fcgi
./fulfillment.fcgi: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
$ ldd fulfillment.fcgi
linux-vdso.so.1 => (0x000003a94301e000)
libssl.so.1.1 => not found
libcrypto.so.1.1 => not found
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x000003a94273d000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x000003a942535000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x000003a942317000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000003a942101000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000003a941d38000)
/lib64/ld-linux-x86-64.so.2 (0x000003a942dfe000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000003a941a32000)
In order to link against the right dynamic libraries, build on Ubuntu
Trusty. To do that, I downloaded the Dockerfile at:
https://github.com/rust-lang-nursery/docker-rust/blob/c34d6993e8f9403c18f348de85787f1585fd3375/1.30.1/stretch/Dockerfile
and changed the first line to:
FROM buildpack-deps:trusty
I then built an image from the Dockerfile and tagged it:
$ docker image build .
$ docker image tag IMAGE_ID rust:1.30.1-trusty
|
|
To deploy, run
$ make deploy
This checks prerequisites and runs `scripts/deploy.sh`.
Makefile:
Include a new target that builds the Rust binaries for Linux using
Docker.
The script `rsync`s the website files to the server, moves some files
around on the server, and runs the database migrations.
Currently I'm getting an error at the database migration stage, as it
seems I can't use `UTC_TIMESTAMP()` as a default column value. Need to
correct that to get a clean deployment.
|
|
Base structure copied from `404.html`. Python script based on the
`generate_homebrew_formula.py` script in the main DomeKey repository.
The filename comes from the Apache server configuration.
Generate the 500 page because we can't rely on dependencies. This gets
the CSS and logo and includes them inline in the HTML page.
Thanks to this answer for explaining how to get a byte string from a
file to send to the base64 encoder:
https://stackoverflow.com/questions/45482272/typeerror-a-bytes-like-object-is-required-not-str-python-2-to-3/45482834#45482834
|
|
There were a bunch of useless empty lines in the Hasp output. Would
rather have had a single newline between each CSS rule, but this is
close enough. At least it looks better.
|
|
For better organisation. Use the 'hasp' CSS preprocessor
(https://github.com/djanowski/hasp).
|