Skip to content

Commit

Permalink
Dev -> Master (#97)
Browse files Browse the repository at this point in the history
* fix(webapp): dockerfile and dependencies

* fix: remove prepare

* chore(webapp): move header component

* chore(header): rename component file

* fix(webapp): header imports

* chore(webapp): format header component

* style(webapp): fix header search

* chore: wrangle vscode workspaces

* chore: webapp settings

* chore: move home and archival pages

* chore: move audit page

* chore: move login page

* chore: logout page

* chore: register page

* chore: video page

* chore: user page

* chore: password reset page

* fix: import errors

* fix flaky CI tests

* Fix non-inline rating display

* chore: hide yarn files

* fix: broken layout

* Remove redis, remove port exposures, harden access to minio

* Fix tests

* remove redis log print

* publish among us impostor images on every branch commit

* feat: basic env vars schema

* feat: compose env vars

* Remove mp4box stage

* refactor(webapp): dependencies (#50)

* chore: remove yarn

* chore: add npm lockfile

* chore: change dockerfile

* chore: remove craco

* chore: thin out deps

* chore: tailwind update

* fix: docker setup

* chore: eslint vscode extension

* chore: fiddling with tailwind theme

* chore: remove react css theme switcher

* chore: tailwind styling

* chore: video list dark theme

* chore: footer dark theme

* chore: login form dark theme

* chore: register page dark theme

* chore: global search dark theme

* fix: webapp ports

* fix: videoservice build crash

* fix: tailwind baseline dark theme

* fix: usernav dark theme

* chore: archival page dark theme

* chore: video page dark theme

* chore: password reset dark mode

* feat: theme lib

* feat: theme swticher component

Co-authored-by: OtoMAN <[email protected]>

* next webpack ws route, nginx debug logs

* refactor(webapp): nextjs migration (#53)

* chore: basic nextjs migration

as per https://nextjs.org/docs/migrating/from-create-react-app

* chore: env vars, readme and configs

* feat: eslint support

* chore: eslint fixes

* chore: remove react-router-dom

* fix: build errors

* chore: postcss config tweak

* chore: icon fixes

* fix: docker issues

* fix: home page fetch

* feat: basic typescript configuration

* chore: typescript migration start

* chore: header component

* chore: footer

* chore: pagination component

* chore: theme switcher

* chore: video list component

* chore: dom lib

* chore: theme lib

* chore: api

* chore: user page

* chore: video page

* chore: archival page

* chore: audits page

* chore: home page

* chore: login page

* chore: logout page

* chore: password reset page

* chore: regsiter page

* chore: cookei store module

* chore: remove command

* fix: style errors

* chore: config

* Add front_api image publish

* feat: docker compose env separation (#54)

* chore: gitignore

* chore: env examples

* chore: basic compose config

* chore: prod compose

* chore: more config fiddling

* fix: frontend api image

* feat: dev compose setup

* docs: migration guide

* feat(webapp): upload page (#55)

* feat: page component

* feat: basic upload form schema

* feat: upload form markup

* feat: upload logic

* feat: form component

* feat: input components markup

* feat: link component markup

* feat: icon component

* feat: label component

* style: inputs

* style: form

* refactor: text input

* style: label

* feat: button component

* fix: form issues

* Fixed CI build with a hack

* Update main.go

* Update .env.example

* feat(cli): cli tool (#60)

* chore: hello world

* chore: cobra carcass

* chore: command descriptions

* chore: env init progress

* chore: util lib carcass

* feat: fs utils

* feat: json lib

* refactor: pacakge imports

* feat: basic viper setup

* chore: file restructure

* feat: env init

* chore: thin out env vars schema

* fix: deps

* chore: rename cli tool

* fix: paths

* docs: install and usage instructions

* feat(webapp): link components (#57)

* chore: sass

* chore: sass base styles

* chore: eof newlines

* feat: base link component

* chore: base link tweak

* feat: external link component

don't need its styling yet
because the base link is assumed external

* feat: internal link component

* style: internal link colours

* feat: local link component

* chore(webapp): baseline sass support (#56)

* chore: sass

* chore: sass base styles

* chore: eof newlines

Co-authored-by: OtoMAN <[email protected]>

* refactor(webapp): links (#58)

* chore: sass

* chore: sass base styles

* chore: eof newlines

* feat: base link component

* chore: base link tweak

* feat: external link component

don't need its styling yet
because the base link is assumed external

* feat: internal link component

* style: internal link colours

* feat: local link component

* refactor: register page

* refactor: login page

* chore: misc lib changes

* refactor: header component

* refactor: theme switcher

* refactor: videolist component

* fix: build errors

* style: header and footer tweaks

* refactor: video page

Co-authored-by: OtoMAN <[email protected]>

* fix: build crash (#62)

* refactor: development compose config (#65)

* chore: vscode stuff

* feat: front_api dev dockerfile

compose file was renamed as per spec:
https://docs.docker.com/compose/compose-file/#compose-file

* feat: scheduler dev image

* feat: stomp proxy dev image

* feat: user service dev image

* feat: video service dev image

* chore: restart directives

* feat: database dev image

* feat: activemq dev iamge

* feat: webapp and minio dev images

* chore: build errors

* fix: build errors

* feat(cli): codegen (#64)

* feat: metaschema codegen

* chore: format result

* chore: move codegen into CLI

* chore: store generated schema as bytes

* feat: cli codegen

* feat(webapp): input components (#63)

* chore: sass

* chore: sass base styles

* chore: eof newlines

* feat: base link component

* chore: base link tweak

* feat: external link component

don't need its styling yet
because the base link is assumed external

* feat: internal link component

* style: internal link colours

* feat: local link component

* refactor: register page

* refactor: login page

* chore: misc lib changes

* refactor: header component

* refactor: theme switcher

* refactor: videolist component

* fix: build errors

* style: header and footer tweaks

* refactor: video page

* refactor: form and input components

* feat: urls lib

* fix: urls lib types

* feat: search select components

* feat: fieldset component

* feat: radio component

* style: select input

* style: radio input

* feat: email input

plus radio group styling

* feat: password component

* chore: form client props

* chore: clean test form

* fix: stomp proxy image (#66)

* fix: stomp proxy image

* chore: delete broken symlink

* fix: create proper symlink

* feat(schema): public API schemas (#67)

* chore: current user profile

* chore: archival request

* chore: archival event

* chore: video detail

* chore: profile data

* chore: audit event

* chore: comment data

* feat: webapp codegen (#69)

* feat: folder reducer

* chore: workspace example file

* feat: codegen lib

* feat: multiline strings lib

* feat: prettier codegen

* chore: metaschema codegen

* feat: metas chema codegen

* feat: metaschema codegen

* feat: json collection function

* feat: inlined schemas and their interfaces

* chore: format index

* fix: schema def

* chore: validator lib

* feat: schema map gen

* feat: interface gen

* feat: validator functon gen

* refactor(webapp): inputs (#68)

* chore: audit fix

* refactor: register page

* chore: move pages

* refactor: login page

* refactor: logout page

* refactor: password reset

* refactor: archive requests page

a minor one beause the page is busy
and in need of decomposition

* chore: user page

* chore: video page

* refactor: video page

* chore: archives page

* chore: remove formik from dependencies

* fix: stomp proxy image

* chore: more types

* chore: split videolist further

* chore: delete broken symlink

* fix: create proper symlink

* chore: login form

* fix: login

* fix: auth pages

* fix: new comment form

* fix: new comment form

* chore: admin controls todo

Co-authored-by: OtoMAN <[email protected]>

* docs: codegen (#70)

* chore: codegen docs

* feat: codegen docs

* feat(cli): json schema map gen (#71)

* chore: move mulitiline func

* chore: gen prep

* chore: shema collection

* feat: schema collection

* feat: schema variables

* feat: schema map

* feat(webapp): list components (#72)

* feat: base list components

* feat: details list component

* feat: card list component

* feat: heading component

* feat: article component

* style: card list

* style: article

* User uploads mostly working

* refactor(webapp): archive requests page (#73)

* refactor: stomp client class

move it into a separate module

* refactor: separate archive requests page

* refactor: archival event page

* refactor: downloads in progress page

* fix: build errors

* style: misc fixes

* refactor: global header component

* refactor: archives root page

* feat(webapp): account hook  (#74)

* chore: hook skeleton

* feat: local store module

* feat: useAccount hook

* refactor: account schema

* fix: codegen skipping formattable files

* feat: account lib

* feat: useAccount hook

* chore: hook comments

* refactor(webapp): page layout (#75)

* chore: move files

* chore :restore meta

* chore: global header

* refactor: account fetches

* chore: account nav

* refactor: account nav

* refactor: theme switcher

* chore: move theme switcher

* refactor: antd buttons

* feat: page component

* style: global header

* style: base font-size

* style: account nav

* refactor: pages layout

* fix: build errors

* chore: video page

* chore: update new pages

* feat: register page context

* feat: login account context

* feat: logout context

* chore : build errors

* fix: build errors

* refactor(webapp): video post card and its list (#77)

* feat: video card

* chore: card stuff

* fix: header account nav

* fix: accoutn fetch url

* fix: card style

* chore: post list

* fix: account hook state

* feat: image components

* feat: link image component

* feat: card preview link

* style: link image

* feat: post video card

* Update required fields for json schmema public api

* fix(webapp): account-related fixes (#76)

* fix: header account nav

* fix: accoutn fetch url

* fix: hook init

* fix(webapp): codegen (#78)

* chore: ajv formats package

* fix: prettier formatting

* feat: format support

* feat: deferred validator compilation

* chore: typescript directive

* Impose memory limits, optimize scheduler memory

* minor memory tweaks, build time improvements WIP

* Fix syntax for actions

* yaml pro

* Split docker secret extraction to separate stage

* correct dockerfile location

* Env file integration

* trying something different

* indentation

* Extension

* Update version

* remove matrix

* test

* bruh

* woooow

* buster

* latest

* name labels

* Correct labels

* Switch release tags

* go mod tidy, small optimizations

* Violated the DRY principle

* refactor(webapp): api module rewrite (#79)

* feat: api fetch lib

* chore: deps cleanup

* chore: env cleanup

* chore: update lockfile

* fix: build errors

* refactor: websocker URL

* fix my garbage

* Correct docker builds

* feat: headless mode (#80)

* chore: move nginx config

* feat: cors config

* feat: api fetch lib

* chore: deps cleanup

* chore: env cleanup

* chore: update lockfile

* fix: build errors

* refactor: websocker URL

* chore: comments

* chore: configs

* fix: volume mount

* fix: config

* feat: nginx config template

* chore: mroe config fiddle

* chore: fetch with creds

* chore: nginx config

* refactor(webapp): audit logs page (#81)

* chore: move nginx config

* feat: cors config

* feat: api fetch lib

* chore: deps cleanup

* chore: env cleanup

* chore: update lockfile

* fix: build errors

* refactor: websocker URL

* chore: comments

* chore: configs

* fix: volume mount

* fix: config

* feat: nginx config template

* chore: mroe config fiddle

* chore: fetch with creds

* chore: nginx config

* refactor: audot logs page

* refactor(webapp): profile page (#82)

* chore: move nginx config

* feat: cors config

* feat: api fetch lib

* chore: deps cleanup

* chore: env cleanup

* chore: update lockfile

* fix: build errors

* refactor: websocker URL

* chore: comments

* chore: configs

* fix: volume mount

* fix: config

* feat: nginx config template

* chore: mroe config fiddle

* chore: fetch with creds

* chore: nginx config

* chore: proper styles ordering

* refactor: archive request status tags

* chore: profile page

* chore: list component

* chore: lsit component

* refactor: profile page

* refactor(webapp): video post page (#84)

* chore: move nginx config

* feat: cors config

* feat: api fetch lib

* chore: deps cleanup

* chore: env cleanup

* chore: update lockfile

* fix: build errors

* refactor: websocker URL

* chore: comments

* chore: configs

* fix: volume mount

* fix: config

* feat: nginx config template

* chore: mroe config fiddle

* chore: fetch with creds

* chore: nginx config

* chore: proper styles ordering

* refactor: archive request status tags

* chore: profile page

* chore: list component

* chore: lsit component

* refactor: profile page

* chore: move post entity

* chore: moving around

* chore: video detail interface

* chore: post rating

* feat: psot rating

* chore: dynamic title

* chore: page title

* chore: tags list

* chore: post article

* refactor: video page

* refactor: post comments

* style: card max width

* fix: build errors

* feat(webapp): pagination component (#85)

* feat: pagination interfaces

* feat: pagination info

* chore: tweak

* chore: internal pagination

* chore: number input

* chore: input component ref

* feat: number input

* feat: internal pagination

* chore: move old pagination

* feat: local pagination component

* feat: local pagination

* fix: index page

* refactor: audit events list (#86)

* refactor(webapp): archival events list (#87)

* refactor: archival events page

* fix: formatting

* refactor: archival request list (#88)

* refactor: downloads list (#89)

* refactor(webapp): global search  (#90)

* style: search input

* refactor: global search

* feat: search page

* refactor(webapp): new pagination (#91)

* style: article

* refactor: search page pagination

* style: adaptive article

* refacto: audit pagination

* refactor: profile page pagination

* chore: remove antd pagination

* chore: remove antd styles

* style: mobile global header

* chore(webapp): remove tailwind and antd (#92)

* chore: remove antd

* chore: merge tailwind reset file

* chore: remove tailwind

* chore: 403 handling

* fix: build errors

* fix: postgres image env var

* Video origin validation + other stuff (#94)

* container host resolution

* Minor improvements to video page style

* Check for origin video existence before upload succeeds

* fixed logout, removed erroneous logs, fixed archival card display, fixed archival delete/retry responsiveness

* envoy protobuf validation

* Implement Validators (#95)

* Proto bump

* Implement delete

* Attempt to fix validator.proto import issues

Co-authored-by: horahoradev <[email protected]>

* Generation working

* Commit validation code

* very basic implementation of proto validation

* improved quality selection

* scheduler proto bump

* per-url event logs

* reorganized archival index

* Card display looks mostly ok

* card improvements

* tabular dls in progress

* Tabbed view for archives

* proto bump

* added general log tail, did bad things

* More resilient startup, follow API redirects

* Proto bump, etc

* Author links on home page

* Update README.md

* Delete rate limiting

Co-authored-by: gabengar <[email protected]>
Co-authored-by: GabenGar <[email protected]>
Co-authored-by: ravihidayat <[email protected]>
  • Loading branch information
4 people authored Oct 9, 2022
1 parent b743bfb commit 4de504e
Show file tree
Hide file tree
Showing 372 changed files with 28,969 additions and 15,005 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
videos/*
64 changes: 29 additions & 35 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build the stack
run: ./up.sh
- name: Run integration tests
Expand All @@ -35,36 +24,41 @@ jobs:
- name: print relevant logs (scheduler)
run: docker logs $(docker ps | grep "scheduler" | awk '{print $1}')
if: always()
- name: print relevant logs (redis)
run: docker logs $(docker ps | grep "redis" | awk '{print $1}')
if: always()
- name: print relevant logs (postgres)
run: docker logs $(docker ps | grep "postgres" | awk '{print $1}')
if: always()
- name: print relevant logs (frontapi)
run: docker logs $(docker ps | grep "frontapi" | awk '{print $1}')
if: always()
- name: Build and push Docker image for userservice
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
context: user_service
push: true
tags: ${{ steps.meta.outputs.tags }}_userservice
labels: ${{ steps.meta.outputs.labels }}_userservice
if: github.ref == 'refs/heads/master'
- name: Build and push Docker image for videoservice
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
context: video_service
push: true
tags: ${{ steps.meta.outputs.tags }}_videoservice
labels: ${{ steps.meta.outputs.labels }}_videoservice
if: github.ref == 'refs/heads/master'
- name: Build and push Docker image for scheduler
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: copy
run: cp ./configs/.env.dev.example .env
- name: copy
run: cp ./configs/.env.dev.example .env.dev
- name: publish
uses: pennsignals/[email protected]
with:
version: dev
docker_compose: 'compose.dev.yaml' # required
- name: copy env
run: cp ./configs/.env.example .env
if: always()
- name: publish
uses: pennsignals/[email protected]
with:
context: scheduler
push: true
tags: ${{ steps.meta.outputs.tags }}_scheduler
labels: ${{ steps.meta.outputs.labels }}_scheduler
if: github.ref == 'refs/heads/master'
version: main
docker_compose: 'docker-compose.yml' # required
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# CLI build output
/horahora
# CLI windows build output
/horahora.exe

# vscode files
*.code-workspace

# temporary folders created by golang watcher
**/tmp/*

youtube-dl*
packer/vpn_conf*
data*
secrets.env
docker-compose.yml
sql/backup*
/videos
/videos

# env file is used for the docker compose
/.env
/.env*
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
// https://go.dev/doc/editors#options
"golang.go",
]
}
95 changes: 95 additions & 0 deletions .vscode/horahora.code-workspace.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"folders": [
{
"name": "horahora",
"path": "."
},
{
"name": "front_api",
"path": "front_api"
},
{
"name": "backup_service",
"path": "backup_service"
},
{
"name": "scheduler",
"path": "scheduler"
},
{
"name": "stomp_proxy",
"path": "stomp_proxy"
},
{
"name": "tests",
"path": "tests"
},
{
"name": "user_service",
"path": "user_service"
},
{
"name": "video_service",
"path": "video_service"
},
{
"name": "webapp",
"path": "webapp"
},
{
"name": "cli",
"path": "cli"
},
{
"name": "schema",
"path": "schema"
}
],
"settings": {
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/node_modules": true,
"front_api": true,
"backup_service": true,
"scheduler": true,
"stomp_proxy": true,
"tests": true,
"user_service": true,
"video_service": true,
"webapp": true,
"schema": true,
"cli": true
},
"files.associations": {
// syntax highlight for example env files
"**/.env*": "dotenv",
// syntax highlight for example workspace files
"**/*.code-workspace*": "jsonc"
},
// remove text 3 options if you've set them up in global editor settings
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true
},
"extensions": {
"recommendations": [
// `.env` syntax highlight
"mikestead.dotenv",
// docker-related features plus highlight in dockerfiles and compose configs
"ms-azuretools.vscode-docker",
// lots of QoL git features
"eamodio.gitlens",
// nginx config highlight
"ahmadalli.vscode-nginx-conf",
// `.sql` formatter
"bradymholt.pgformatter",
// `.proto3` syntax highlight
"zxh404.vscode-proto3"
]
}
}
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"gopls": {
"ui.semanticTokens": true
},
"[json]": {
"editor.tabSize": 2
},
"[jsonc]": {
"editor.tabSize": 2
},
"json.schemas": [
{
"fileMatch": ["schema/**/*schema.json"],
"url": "./schema/meta.schema.json"
}
],
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true
}
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Thank you for your interest in contributing to Horahora! Think you can do better
![](https://raw.githubusercontent.com/horahoradev/horahora/master/Architectural_Drawing.png)

Horahora's architecture is microservice-based. The main microservices are:
- front_api: which is the RESTful API to the rest of the services
- userservice: which does all authentication and handles user storage/permissions
- videoservice: which does all video storage, uploads to the origin (e.g. s3/backblaze), queries, transcoding, etc
- scheduler: which handles content archival requests and downloads
- `front_api`: which is the RESTful API to the rest of the services
- `userservice`: which does all authentication and handles user storage/permissions
- `videoservice`: which does all video storage, uploads to the origin (e.g. s3/backblaze), queries, transcoding, etc
- `scheduler`: which handles content archival requests and downloads
Communication between userservice, videosercvice, and scheduler is GRPC-based. For more details on individual microservice architecture, see the README for whichever microservice.

Postgresql is used as the database for each service, but Redis is also used for very specific purposes (e.g. distributed locking). Schema migrations can be found within the "migrations" directory within each service. As an example, [here's the migrations directory for Videoservice](https://github.com/horahoradev/horahora/tree/master/video_service/migrations). Migrations are applied using Flyway as a means of providing schema versioning.
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
FROM golang
FROM golang:1.17

RUN apt-get update && \
apt install -y protobuf-compiler && \
go install google.golang.org/protobuf/cmd/[email protected] && \
go install google.golang.org/grpc/cmd/[email protected]

RUN go env -w GO111MODULE="off" && \
go get github.com/envoyproxy/protoc-gen-validate && \
go env -w GO111MODULE=""

RUN go install github.com/envoyproxy/[email protected]

COPY gen_all.sh /bin/gen_all.sh

WORKDIR /

ENTRYPOINT ["/bin/gen_all.sh"]
ENTRYPOINT ["/bin/gen_all.sh"]
1 change: 1 addition & 0 deletions Dockerfile.postgres.dev
77 changes: 69 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,87 @@ It allows you to:

Join our Discord: https://discord.gg/vfwfpctJRZ

![](https://raw.githubusercontent.com/horahoradev/horahora-designs/master/video_page_dark.png)
![](https://github.com/horahoradev/horahora-designs/blob/master/Screenshot%20from%202022-10-09%2011-56-34.png?raw=true)

![](https://raw.githubusercontent.com/horahoradev/horahora-designs/master/homepage_dark.png)
![](https://github.com/horahoradev/horahora-designs/blob/master/Screenshot%20from%202022-10-09%2011-54-48.png?raw=true)

![](https://raw.githubusercontent.com/horahoradev/horahora-designs/master/archival_page_dark.png)
![](https://github.com/horahoradev/horahora-designs/blob/master/Screenshot%20from%202022-10-09%2011-57-35.png?raw=true)

![](https://github.com/horahoradev/horahora-designs/blob/master/Screenshot%20from%202022-10-09%2011-57-52.png?raw=true)

Archival capabilities are provided by yt-dlp (a fork of youtube-dl).

## Local Use Instructions (START HERE)

1. Install docker and docker-compose
2. Run: sudo ./up.sh
3. Wait a minute, then visit localhost:80
4. Login as admin/admin
2. Generate private key:
```sh
openssl genrsa 2048
```
3. Create env vars file:
```sh
cp configs/.env.example .env
```
4. Save the private key into `JWT_KEYPAIR` value:
```sh
JWT_KEYPAIR="-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----"
```
The value should be double-quoted.
5. Start up the stack:
```sh
sudo ./up.sh
```
6. Wait a minute, then visit localhost:80
7. Login as admin/admin
- note that with the current video approval workflow, non-admin users won't be able to view unapproved videos
- it's recommended to visit /password-reset immediately to change the admin user's default password if using in an untrusted environment
5. navigate to the archival requests page from the hamburger menu, add a link, and wait a few minutes
8. navigate to the archival requests page from the hamburger menu, add a link, and wait a few minutes
That's it for basic usage, and should work. If that doesn't work, bug me on Discord.
## Develop
**DO NOT RUN THIS SETUP IN ANY PUBLIC CONTEXT.**
### Requirements
Golang - 1.18+
### Docker stack
1. Copy example env file:
```sh
cp ./configs/.env.dev.example .env.dev
```
2. Build the local images:
```sh
docker-compose --env-file .env.dev build
```
3. Start the dev stack:
```sh
docker-compose --env-file .env.dev up --build
```
4. Tear down the dev stack:
```sh
docker-compose --env-file .env.dev down
```
### CLI (experimental)
1. Build CLI tool in the project root:
```sh
cd cli && go build -o ../horahora . && cd ..
```
2. Use CLI tool:
```sh
./horahora
```
Instructions and available commands will be shown within it.
## Contributing
Contributions are always welcome. Please see [CONTRIBUTING.md](https://github.com/horahoradev/horahora/blob/master/CONTRIBUTING.md) for details, including an architectural rundown.
Expand Down
1 change: 0 additions & 1 deletion activemq/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM symptoma/activemq:latest


COPY activemq.xml /opt/activemq/conf/activemq.xml

CMD ["/bin/sh", "-c", "bin/activemq console -Djetty.host=0.0.0.0"]
7 changes: 7 additions & 0 deletions activemq/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG ACTIVEMQ_IMAGE

FROM ${ACTIVEMQ_IMAGE}

COPY activemq.xml /opt/activemq/conf/activemq.xml

CMD ["/bin/sh", "-c", "bin/activemq console -Djetty.host=0.0.0.0"]
Loading

0 comments on commit 4de504e

Please sign in to comment.