Hide & Seek - Fort Collins
- Elixir 67.4%
- TypeScript 25.3%
- JavaScript 2.6%
- CSS 1.8%
- Shell 1.4%
- Other 1.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .githooks | ||
| assets | ||
| config | ||
| entrypoints | ||
| lib | ||
| priv | ||
| test | ||
| .dockerignore | ||
| .formatter.exs | ||
| .gitignore | ||
| Dockerfile | ||
| mix.exs | ||
| mix.lock | ||
| README.md | ||
| reconn.container | ||
Reconn(ect)
This is the backend and web application for hide and seek. We use Elixir
(version 1.15.7, Erlang/OTP 25) with the Phoenix (version 1.7.10) framework.
The Dockerfile builds a self-contained production image running the entire
stack in a single container.
Local
Build and run the container like so:
$ podman build -t reconn .
$ podman run -p 4000:4000 -v reconn-data:/var/lib/reconn reconn
Quadlet
The reconn.container file is a Quadlet. After building the container image, you can install the systemd unit onto the host:
$ podman build -t reconn .
$ podman quadlet install reconn.container
NGINX
Use Let's Encrypt to get a TLS certificate:
$ certbot certonly --standalone -d fc.jrpotter.com
You can then expose the container by including the following stanza within an NGINX config:
server {
server_name fc.jrpotter.com;
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/fc.jrpotter.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/fc.jrpotter.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:4000;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}