63 lines
1.8 KiB
Markdown
63 lines
1.8 KiB
Markdown
|
---
|
||
|
title: Comments!
|
||
|
date: 2024-09-17
|
||
|
tags:
|
||
|
- my-blog
|
||
|
---
|
||
|
|
||
|
I got it working! For now at least. Comments are hosted on my own private server using [Comentario](https://docs.comentario.app/). I don't feel like doing a full writeup right now but uhhhhh I'll just dump my config files, maybe it'll help you set this up someday
|
||
|
|
||
|
```yaml
|
||
|
# docker-compose.yml
|
||
|
version: '3'
|
||
|
|
||
|
services:
|
||
|
app:
|
||
|
image: registry.gitlab.com/comentario/comentario:dev-4e35a801
|
||
|
network_mode: host
|
||
|
environment:
|
||
|
PORT: 8300
|
||
|
BASE_URL: https://xnil.io/comentario
|
||
|
SECRETS_FILE: /secrets.yaml
|
||
|
volumes:
|
||
|
- ./secrets.yaml:/secrets.yaml:ro
|
||
|
command: /comentario/comentario -v
|
||
|
restart: unless-stopped
|
||
|
```
|
||
|
|
||
|
```xml
|
||
|
<VirtualHost *:80>
|
||
|
|
||
|
ServerName xnil.io
|
||
|
RewriteEngine on
|
||
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
||
|
|
||
|
</VirtualHost>
|
||
|
|
||
|
<VirtualHost *:443>
|
||
|
|
||
|
ServerName xnil.io
|
||
|
DocumentRoot /data/xnil.io/site
|
||
|
ErrorDocument 404 /404.html
|
||
|
|
||
|
ProxyPreserveHost On
|
||
|
ProxyPass /comentario http://localhost:8300/comentario
|
||
|
ProxyPassReverse /comentario http://localhost:8300/comentario
|
||
|
|
||
|
<Directory />
|
||
|
Options FollowSymLinks MultiViews
|
||
|
Require all granted
|
||
|
</Directory>
|
||
|
|
||
|
Include /etc/letsencrypt/options-ssl-apache.conf
|
||
|
SSLCertificateFile /etc/letsencrypt/live/xnil.io/fullchain.pem
|
||
|
SSLCertificateKeyFile /etc/letsencrypt/live/xnil.io/privkey.pem
|
||
|
</VirtualHost>
|
||
|
```
|
||
|
|
||
|
I had to read this like four times to make sure it wasn't gonna leak anything but I'm pretty sure all the actual important stuff is in the secrets file. Good job Comentario.
|
||
|
|
||
|
Oh yeah also I had to google a bunch of commands to hack together a postgres server. That's why I have network-mode host set in the docker. If you can get a container to talk to the bridged network some other way then let me know. In the comments! Or send me an email lol.
|
||
|
|
||
|
ok bye!
|