<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dome-key-web/Makefile, branch master</title>
<subtitle>DomeKey website</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dome-key-web/'/>
<entry>
<title>lighttpd.conf: Allow running from the project root</title>
<updated>2018-11-23T00:02:39+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-23T00:02:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dome-key-web/commit/?id=d9add7fd9b7e81275157b8e9e6e10df26971fd39'/>
<id>d9add7fd9b7e81275157b8e9e6e10df26971fd39</id>
<content type='text'>
* Move the `make run` target into the project root's Makefile
* Update paths in lighttpd.conf to correspond to its new location
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Move the `make run` target into the project root's Makefile
* Update paths in lighttpd.conf to correspond to its new location
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Fix Docker volume path</title>
<updated>2018-11-22T23:49:56+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-22T23:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dome-key-web/commit/?id=fcd26b689eb52f271cd1ca45dbd0702243b06df0'/>
<id>fcd26b689eb52f271cd1ca45dbd0702243b06df0</id>
<content type='text'>
Needs the project root in order to access `production-config/env`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Needs the project root in order to access `production-config/env`.
</pre>
</div>
</content>
</entry>
<entry>
<title>license-generator: Use compile-time environment variables</title>
<updated>2018-11-20T06:20:15+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-20T06:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dome-key-web/commit/?id=7d7ac8d747be198088664e45e5423919d9876651'/>
<id>7d7ac8d747be198088664e45e5423919d9876651</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Build Rust code on Ubuntu Trusty</title>
<updated>2018-11-20T06:08:03+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-20T06:08:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dome-key-web/commit/?id=3002290d98c31dc941b33946197e7f58c7ff9dad'/>
<id>3002290d98c31dc941b33946197e7f58c7ff9dad</id>
<content type='text'>
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 =&gt;  (0x000003a94301e000)
            libssl.so.1.1 =&gt; not found
            libcrypto.so.1.1 =&gt; not found
            libdl.so.2 =&gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x000003a94273d000)
            librt.so.1 =&gt; /lib/x86_64-linux-gnu/librt.so.1 (0x000003a942535000)
            libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x000003a942317000)
            libgcc_s.so.1 =&gt; /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000003a942101000)
            libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x000003a941d38000)
            /lib64/ld-linux-x86-64.so.2 (0x000003a942dfe000)
            libm.so.6 =&gt; /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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 =&gt;  (0x000003a94301e000)
            libssl.so.1.1 =&gt; not found
            libcrypto.so.1.1 =&gt; not found
            libdl.so.2 =&gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x000003a94273d000)
            librt.so.1 =&gt; /lib/x86_64-linux-gnu/librt.so.1 (0x000003a942535000)
            libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x000003a942317000)
            libgcc_s.so.1 =&gt; /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000003a942101000)
            libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x000003a941d38000)
            /lib64/ld-linux-x86-64.so.2 (0x000003a942dfe000)
            libm.so.6 =&gt; /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
</pre>
</div>
</content>
</entry>
<entry>
<title>Add deployment script</title>
<updated>2018-11-20T01:16:23+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-20T01:16:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dome-key-web/commit/?id=1db7ad0581e7b51c472e03899c367ed61d24744c'/>
<id>1db7ad0581e7b51c472e03899c367ed61d24744c</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add 500 error page with generator</title>
<updated>2018-11-13T20:11:52+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-13T20:11:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dome-key-web/commit/?id=fd154a053eb2b6240e2b0889acd922b5ac43212e'/>
<id>fd154a053eb2b6240e2b0889acd922b5ac43212e</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Remove empty lines from 'styles.css'</title>
<updated>2018-11-08T15:27:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-08T15:27:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dome-key-web/commit/?id=6e061780be4a5c0f2543d314f37cb25601d4b286'/>
<id>6e061780be4a5c0f2543d314f37cb25601d4b286</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Split CSS into separate files</title>
<updated>2018-11-08T14:44:27+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-08T14:44:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dome-key-web/commit/?id=dddf70e6e2168a72ea6401045ee29967befc915c'/>
<id>dddf70e6e2168a72ea6401045ee29967befc915c</id>
<content type='text'>
For better organisation. Use the 'hasp' CSS preprocessor
(https://github.com/djanowski/hasp).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For better organisation. Use the 'hasp' CSS preprocessor
(https://github.com/djanowski/hasp).
</pre>
</div>
</content>
</entry>
</feed>
