The source code of https://asoul.video/
TBD
The ASOUL-Video backend server binary is meant to be run on Linux system, but you can also develop it on macOS.
ASOUL-Video backend has the following dependencies:
- Git (v1.8.3 or higher)
- Go (v1.16 or higher)
- PostgreSQL (v12 or higher)
- Golang Migrate (v4.7.0 or higher)
-
Install Homebrew.
-
Install dependencies:
brew install go postgresql git
-
Configure PostgreSQL to start automatically:
brew services start postgresql
-
Ensure
psql
, the PostgreSQL command line client, is on your$PATH
. Homebrew does not put it there by default. Homebrew gives you the command to run to insertpsql
in your path in the "Caveats" section ofbrew info postgresql
. Alternatively, you can use the command below. It might need to be adjusted depending on your Homebrew prefix (/usr/local
below) and shell (bash below).hash psql || { echo 'export PATH="/usr/local/opt/postgresql/bin:$PATH"' >> ~/.bash_profile } source ~/.bash_profile
You need a fresh Postgres database and a database user that has full ownership of that database.
-
Create a database for the current Unix user:
# For Linux users, first access the postgres user shell sudo su - postgres
createdb
-
Create the ASOUL-Video user and password:
createuser --superuser asoulvideo psql -c "ALTER USER asoulvideo WITH PASSWORD 'asoulvideo';"
-
Create the ASOUL-Video database:
createdb --owner=asoulvideo --encoding=UTF8 --template=template0 asoulvideo
Generally, you don't need a full clone, so set --depth
to 1
:
git clone --depth 1 https://github.com/asoul-video/asoul-video
NOTE The repository has Go Modules enabled, please clone to somewhere outside your $GOPATH
.
The Fork AI backend reads PostgreSQL connection configuration from
the PG*
environment variables.
Add these, for example, in your ~/.bashrc
:
export PGPORT=5432
export PGHOST=localhost
export PGUSER=asoulvideo
export PGPASSWORD=asoulvideo
export PGDATABASE=asoulvideo
export PGSSLMODE=disable
You can also use a tool like direnv
to source these env vars on demand when you start the
backend.
The web server requires few environment variables to make it fully working, add them to your ~/.bashrc
:
export SOURCE_REPORT_KEY=<REDACTED>
go build . && ./asoul-video
MIT