archiv-try

command module
v0.0.0-...-c0bf0b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

README

wubbl0rz VOD Archiv

Stack: Go, Gin, Gorm, FFmpeg

🐳 Deploy

Copy .env.sample to .env and replace the required variables.

Example docker-compose.yml

version: '3'
services:
  api:
    container_name: archiv-api
    build: .
    restart: unless-stopped
    env_file: .env
    ports:
      - 127.0.0.1:5000:5000
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /path/to/media/:/var/www/media/
    depends_on:
      - db
  db:
    container_name: archiv-db
    image: postgres:15-alpine
    restart: unless-stopped
    env_file: .env
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /path/to/postgres/:/var/lib/postgresql/data

🚪 Reverse Proxy

The easiest way is to use caddy. Paste the following into a file called Caddyfile. Change the root path to the parent directory of media (/path/to/) and run caddys system service.

api.wubbl0rz.tv {
    root * /path/to/
    @excludePaths {
        not path /media/*
    }
    reverse_proxy @excludePaths localhost:5000
    file_server
    encode gzip
    header * Cache-Control max-age=1
    header Access-Control-Allow-Origin "*"
    header Cross-Origin-Resource-Policy "*"
}

Backup and restore database

Required to upgrade major postgres versions.

Backup docker exec -t archiv-db pg_dumpall -c -U YOUR_DB_USER > /path/to/backup/dump_$(date +%Y-%m-%d"_"%H_%M_%S).sql

Restore docker exec -i archiv-db psql -d YOUR_DB_NAME -U YOUR_DB_USER < /path/to/backup/dump_<some-date>.sql

Documentation

Check out the swagger page for more documentation.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL