Selbst gehostete U-Bahn-Infrastruktur auf Vultr







Über was, warum und warum?



Ich beschloss, diese kleine Notiz nach meiner eigenen Erfahrung mit der Bereitstellung einer persönlichen "Infrastruktur" zu schreiben, die aus mehreren Anwendungen für alltägliche Angelegenheiten besteht.







Hier werde ich Ihnen erklären , wie Sie Dienste bereitstellen, um Finanzen ( FireFly3 ), Notizen und was größer ist ( BookStack ) zu steuern und die Zeit zu steuern, die für Aufgaben in OpenSource-Projekten oder bei der Arbeit ( Titra ) aufgewendet wird - all dies auf Vultr mit Schutz durch Firewall-Gruppen und Zugriff nur von der notwendigen IP, zum Beispiel Home Statics oder VPN (wir werden Pritunl dafür erweitern).







Ich habe mich für Vultr entschieden, weil ich schon lange mit ihm zusammenarbeite und bereits weiß, was er kann und was nicht - in meinem Fall war er perfekt.







Hoffe das ist hilfreich für jemanden.







Bereitstellen von Diensten



Für die Dienste (alle drei) habe ich eine einfache Instanz für automatische Vultr + -Sicherungen ausgewählt, da nicht alle Ressourcen besonders beanspruchen.













.: , DNS, (certbot), , , personal.io, :)







. 2: — docker, , .







— FireFly3



Demo







. : , - , - .







FireFly3 , , .. ..













firefly3 , docker, . docker-compose c firefly :







version: '3.3'

services:
  fireflyiii:
    image: jc5x/firefly-iii:latest
    volumes:
      - firefly_iii_upload:/var/www/html/storage/upload
    env_file:
      - .env
    restart: unless-stopped
    ports:
      - 127.0.0.1:34567:8080
    depends_on:
      - fireflyiiidb

  fireflyiiidb:
    image: yobasystems/alpine-mariadb:latest
    restart: unless-stopped
    env_file:
      - .env.db
    volumes:
      - firefly_iii_db:/var/lib/mysql

volumes:
   firefly_iii_upload:
     driver: local
   firefly_iii_db:
     driver: local
      
      





, env- , , : , (SMTP MAILGUN), , (, , eloquent LDAP), , finance.personal.io. env- ( ) pastebin .







firefly3 , nginx proxypass , .







, .. — BookStack



Demo







/, - , , BookStack — , , markdown ( , ), : --.













, .







docker-compose.yml:







version: "3.1"
services:
  bookstack:
    image: linuxserver/bookstack
    container_name: bookstack
    volumes:
      - bookstack-volume:/config
    ports:
      - 127.0.0.1:34568:80
    env_file: 
      - .env.bookstack
    restart: unless-stopped
    depends_on:
      - bookstack_db

  bookstack_db:
    image: linuxserver/mariadb
    container_name: bookstack_db
    volumes:
      - bookstack-db:/config
    env_file: 
      - .env.db
    restart: unless-stopped

volumes:
  bookstack-volume:
    driver: local
  bookstack-db:
    driver: local
      
      





, firefly, web .







.env.bookstack:







DB_HOST=bookstack_db
DB_USER=bookstack
DB_PASS=bookstackpassword
DB_DATABASE=bookstackapp
APP_URL=https://notes.personal.io
      
      





, admin , .







bookstack LDAP, SAML — . pdf html, , .. .







— Titra



Demo







, , , . Titra , , (, ), ( ), ..













docker-compose.yml:







version: "3.1"
services:
  titra:
    image: kromit/titra
    container_name: titra
    depends_on:
      - mongodb
    ports:
      - "127.0.0.1:34569:3000"
    env_file:
      - .env.titra
    restart: always

  mongodb:
    image: mongo:4.2
    container_name: mongodb
    restart: always
    volumes:
      - titra_db:/data/db

volumes:
  titra_db:
    driver: local
      
      





.env.titra:







ROOT_URL=https://titra.personal.io
MONGO_URL=mongodb://mongodb/titra
      
      





: — Homer



Demo







, , , , . , heimdall homer, , .







Homer , , (, ).













docker-compose.yml:







version: "3.3"
services:
  homer:
    image: b4bz/homer:latest
    volumes:
      - ./assets:/www/assets
    ports:
      - "127.0.0.1:34570:8080"
    restart: unless-stopped

      
      





homer assets config.yml, , .







:







title: "Infrastructure"
subtitle: "Personal"

documentTitle: "Personal/Infrastructure"
icon: "fas fa-skull-crossbones"
header: true

columns: "3"

theme: default

colors:
  dark:
    highlight-primary: "#3367d6"
    highlight-secondary: "#4285f4"
    highlight-hover: "#5a95f5"
    background: "#131313"
    card-background: "#2b2b2b"
    text: "#eaeaea"
    text-header: "#ffffff"
    text-title: "#fafafa"
    text-subtitle: "#f5f5f5"
    card-shadow: rgba(0, 0, 0, 0.4)
    link-hover: "#ffdd57"

services:
  - name: "Main"
    icon: "fas fa-code-branch"
    items:
      - name: "Titra"
        icon: "fas fa-clock"
        subtitle: "time-tracking"
        url: "https://titra.personal.io"

      - name: "FireFly3"
        icon: "fas fa-piggy-bank"
        subtitle: "finance"
        url: "https://finance.personal.io"

      - name: "BookStack"
        icon: "fas fa-book"
        subtitle: "notes-articles-book"
        url: "https://notes.personal.io"
      
      





:













home.personal.io









, nginx certbot. , : apps.conf







nginx:







systemctl start nginx
      
      





, A- DNS , home, notes, finance, titra ip Vultr, certbot Let's Encrypt, :







certbot run --nginx
      
      





, .









, , :







  1. Prtinul
  2. firewall Vultr


, ( 60 ) pritunl vultr .







, firewall vultr ( )















  1. "Add firewall group".







  2. , , , 22 , - VPN. , :















  1. , , .







  2. .










All Articles