cleanup #7

Merged
neurobomber merged 3 commits from cleanup into main 2024-11-12 14:56:07 -05:00
11 changed files with 177 additions and 40 deletions
Showing only changes of commit 4f16bd46d9 - Show all commits

View File

@ -204,8 +204,8 @@ services:
- TZ=Etc/UTC - TZ=Etc/UTC
- DOCKER_MODS=linuxserver/mods:universal-calibre #optional - DOCKER_MODS=linuxserver/mods:universal-calibre #optional
- OAUTHLIB_RELAX_TOKEN_SCOPE=1 #optional - OAUTHLIB_RELAX_TOKEN_SCOPE=1 #optional
- VIRTUAL_HOST=calibre-web.${DOMAIN} - VIRTUAL_HOST=books.${DOMAIN}
- LETSENCRYPT_HOST=calibre-web.${DOMAIN} - LETSENCRYPT_HOST=books.${DOMAIN}
- LETSENCRYPT_EMAIL=${EMAIL} - LETSENCRYPT_EMAIL=${EMAIL}
volumes: volumes:
- ${CONFIG_LOCATION}/calibre-web:/config - ${CONFIG_LOCATION}/calibre-web:/config

View File

@ -34,44 +34,6 @@ services:
- 3001:3001 - 3001:3001
volumes: volumes:
- /:/mnt/host:ro - /:/mnt/host:ro
prometheus:
image: prom/prometheus
container_name: prometheus
user: '0'
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090
restart: unless-stopped
volumes:
- ${CONFIG_LOCATION}/prometheus:/etc/prometheus
- ${DATA_LOCATION}/prometheus:/prometheus
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
ports:
- 9100:9100
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
grafana:
image: grafana/grafana-enterprise
container_name: grafana
restart: unless-stopped
user: '0'
environment:
- GF_SERVER_ROOT_URL=https://grafana.${DOMAIN}
- GF_INSTALL_PLUGINS=grafana-clock-panel
- VIRTUAL_HOST=grafana.${DOMAIN}
- LETSENCRYPT_HOST=grafana.${DOMAIN}
- LETSENCRYPT_EMAIL=${EMAIL}
volumes:
- ${CONFIG_LOCATION}/grafana:/var/lib/grafana
ports:
- '3003:3000'
networks: networks:
default: default:
name: nginx-proxy name: nginx-proxy

7
monitoring/.env.example Normal file
View File

@ -0,0 +1,7 @@
DOMAIN=example.com
UID=1000
GID=1000
TZ=Etc/UTC
CONFIG_LOCATION=./config
DATA_LOCATION=./data
EMAIL=example@mail.com

1
monitoring/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
data/

View File

@ -0,0 +1,60 @@
services:
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
privileged: true
restart: unless-stopped
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
prometheus:
image: prom/prometheus
container_name: prometheus
user: '0'
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090
restart: unless-stopped
volumes:
- ${CONFIG_LOCATION}/prometheus:/etc/prometheus
- ${DATA_LOCATION}/prometheus:/prometheus
node-exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node-exporter
command:
- '--path.rootfs=/host'
ports:
- 9100:9100
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
smartctl-exporter:
image: prometheuscommunity/smartctl-exporter
container_name: smartctl-exporter
privileged: true
user: root
ports:
- "9633:9633"
grafana:
image: grafana/grafana-enterprise
container_name: grafana
restart: unless-stopped
user: '0'
environment:
- GF_SERVER_ROOT_URL=https://grafana.${DOMAIN}
- GF_INSTALL_PLUGINS=grafana-clock-panel
- VIRTUAL_HOST=grafana.${DOMAIN}
- LETSENCRYPT_HOST=grafana.${DOMAIN}
- LETSENCRYPT_EMAIL=${EMAIL}
volumes:
- ${CONFIG_LOCATION}/grafana:/var/lib/grafana
ports:
- '3003:3000'
networks:
default:
name: nginx-proxy
external: true

View File

@ -0,0 +1,5 @@
DBPASS=rittenhop
EMAIL=example@rittenhop.org
TZ=America/New_York
SITE=rittenhop.org
PORT=2368

View File

@ -0,0 +1,30 @@
{
"url": "http://localhost:2377",
"server": {
"port": 2377,
"host": "::"
},
"mail": {
"transport": "SMTP",
"options": {
"service": "Mailgun",
"host": "smtp.mailgun.org",
"port": 587,
"secure": false,
"auth": {
"user": "",
"pass": ""
}
}
},
"logging": {
"transports": [
"file",
"stdout"
]
},
"process": "systemd",
"paths": {
"contentPath": "/var/lib/ghost/content"
}
}

View File

@ -0,0 +1,30 @@
{
"url": "http://localhost:2377",
"server": {
"port": 2377,
"host": "::"
},
"mail": {
"transport": "SMTP",
"options": {
"service": "Mailgun",
"host": "smtp.mailgun.org",
"port": 587,
"secure": false,
"auth": {
"user": "",
"pass": ""
}
}
},
"logging": {
"transports": [
"file",
"stdout"
]
},
"process": "systemd",
"paths": {
"contentPath": "/var/lib/ghost/content"
}
}

View File

@ -0,0 +1,40 @@
services:
ghost:
image: ghost:5
container_name: rittenhop-ghost
restart: always
ports:
- ${PORT}:2377
expose:
- ${PORT}
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: rittenhop-db
database__connection__user: root
database__connection__password: ${DBPASS}
database__connection__database: rittenhop
VIRTUAL_HOST: "${SITE}"
VIRTUAL_PORT: ${PORT}
LETSENCRYPT_HOST: "${SITE}"
LETSENCRYPT_EMAIL: ${EMAIL}
# url: http://0.0.0.0:${PORT} #Dev
url: "https://${SITE}" #Prod
# contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
# NODE_ENV: development
volumes:
- ./content:/var/lib/ghost/content
# - ./themes:/var/lib/ghost/current/content/themes:rw
db:
image: mysql:8.0
container_name: rittenhop-db
restart: always
environment:
MYSQL_DATABASE: rittenhop
MYSQL_ROOT_PASSWORD: ${DBPASS}
volumes:
- ./db:/var/lib/mysql
networks:
default:
name: nginx-proxy
external: true

View File

@ -0,0 +1 @@
sudo docker cp config.production.json rittenhop-ghost:/var/lib/ghost/.

View File

@ -39,6 +39,7 @@ services:
ports: ports:
- 4018:3000 - 4018:3000
environment: environment:
JAVA_OPTS: "-Xmx1g" #-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/directory
MB_DB_TYPE: postgres MB_DB_TYPE: postgres
MB_DB_DBNAME: ${PGDATABASE:-postgres} MB_DB_DBNAME: ${PGDATABASE:-postgres}
MB_DB_PORT: 5432 MB_DB_PORT: 5432