Skip to content

Instantly share code, notes, and snippets.

@balen
balen / planorama
Created May 8, 2025 13:41
Planorama NGINX file (sans letsencrypt)
# Set the servername to match your DNS entry
# Use letsenrypt to install a SLL cert
server {
server_name XXXXXXXX;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
@balen
balen / Caddyfile
Created May 8, 2025 13:36
Sample Caddy file for proxy
#
# Assuming the domain is planorama.XXXXX.org, change to match the domain you are using
#
planorama.XXXXX.org {
handle_errors {
@error50x expression {http.error.status_code} >= 500 && {http.error.status_code} < 600
handle @error50x {
rewrite * /opt/planorama/shared/maintenance.html
file_server
}
@balen
balen / maintenance.html
Created May 8, 2025 13:34
Maintenance HTML file
<!doctype html>
<html>
<head>
<title>Planorama</title>
</head>
<body>
<h1>Oops!</h1>
<h2>We're sorry, Planorama is currently down.</h2>
<h3>Please check back in a few minutes.</h3>
</body>
@balen
balen / planorama.env
Last active May 8, 2025 13:33
ENV for Planorama - insert your values
#
# The env variables for plano
#
RAILS_ENV=production
RAILS_LOG_TO_STDOUT=true
RAILS_LOG_LEVEL=info
RAILS_MAX_THREADS=15
DB_POOL=15
### check with IT for DNS hostname
@balen
balen / redeploy.sh
Created May 8, 2025 13:28
Script to start/restart etc Plano
#!/usr/bin/bash
cd /opt/planorama/app
/usr/bin/docker compose pull && /usr/bin/docker compose down && /usr/bin/docker compose up -d
@balen
balen / docker-compose.yml
Created May 8, 2025 13:26
Prod Docker Compose file for Planorama (example)
#
# NOTE:
# You will need to create the redis-data volumes:
# docker volume create --name=redis-data
#
# NOTE: if you want to run postgres in a container have a look at the staging compose file
# you will need to set the links for web and sidekiq accordingling and also set up
# an external volume for postgres data
#
# docker volume create --name=pgdata
@balen
balen / docker-compose.yml
Last active March 25, 2024 17:27
Sample compose file for production
#
# This is sample docker file for use in a prod environment
#
# NOTE: You will need to create the persistent volumes:
#
# docker volume create --name=redis-data
# docker volume create --name=pgdata
#
version: "3.7"