This is a very simple demo Elixir application written purely to do the fallowing things:
- Play around with Cowboy (Erlang HTTP server).
- Create a release using Distillery (maybe in combination with Docker).
More expirements may fallow (the above list will be updated).
Building the docker container and run it:
docker build --rm -t hello_world .
docker run --rm -d -p 8080:8080 -t hello_world
Requirement for creating self-signed certificate is openssl
. Find out if you have openssl
installed by running the fallowing:
$ which openssl
/usr/bin/openssl
It returns openssl not found
if you don't have openssl
installed.
Creating the key and the crt files in ./cert
:
$ mkdir cert && cd cert
$ openssl req -newkey rsa:2048 -nodes -keyout hello_world.key -x509 -days 365 -out hello_world.crt -subj "/C=NL/ST= /L= /O= /CN= "
- Use a self-signed SSL sertificate so I can serve using HTTPS.
- Use Docker.
- Remove Server Response Header using a Cowboy Stream.
- Redirect http to https.
- Create a docker-compose file.
-
Use Conform for setting run-time configuration.(Experimented with it, but at this time not needed.)