Deployment
Docker deployment
docker-compose.yml
yaml
services:
cthunline:
image: cthunline/cthunline:latest
container_name: cthunline
restart: unless-stopped
env_file:
- .env
networks:
- cthunline-network
ports:
- 8080:8080
postgresql:
image: postgres:latest
container_name: postgresql
restart: unless-stopped
networks:
- cthunline-network
volumes:
- postgresql_data:/var/lib/postgresql
environment:
POSTGRES_USER: username
POSTGRES_PASSWORD: password
valkey:
image: valkey/valkey:latest
container_name: valkey
restart: unless-stopped
networks:
- cthunline-network
garage:
image: dxflrs/garage:v2.3.0
container_name: garage
restart: unless-stopped
volumes:
- ./garage.toml:/etc/garage.toml
- garage_meta:/var/lib/garage/meta
- garage_data:/var/lib/garage/data
volumes:
postgresql_data:
garage_meta:
garage_data:
networks:
cthunline-network:
name: cthunline.env
Check the .env.sample file from the repository.
Reverse proxy
Caddy
nginx
# set your domain here
my.cthunline.app {
reverse_proxy http://cthunline:8080
}Nginx
nginx
server {
listen 80;
listen [::]:80;
# set your domain here
server_name my.cthunline.app;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
# set your domain here
server_name my.cthunline.app;
# path to ssl certificate files here
ssl_certificate /path/to/ssl/fullchain.pem;
ssl_certificate_key /path/to/ssl/privkey.pem;
location / {
# change port here
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Connection 'upgrade';
proxy_set_header Upgrade $http_upgrade;
proxy_cache_bypass $http_upgrade;
# change the max body size depending on server configuration
client_max_body_size 100M;
}
}