Full Setup
There are two ways of setting up a full version of Corlink:
Docker Compose (Recommended)
This is the recommended way of setting up Corlink. It is the easiest and fastest way to get a full instance of Corlink up and running.
Prerequisites
- Docker
- Docker Compose
- A discord bot token. (See setup here)
Steps
- Acquire the
docker-compose.yml
file from the Corlink repository.
- You can find the file here.
- Setup the folders for the database and other volumes where your
docker-compose.yml
file is located.
mkdir -p postgres/
- Edit the
docker-compose.yml
files environment variables.
When changing the
POSTGRES_USER
, POSTGRES_PASSWORD
, and POSTGRES_DB
variables, you will also need to change the DB_USER
, DB_PASSWORD
, and DB_NAME
variables in the corlink-server
service.Make sure to change the
ADMIN_KEY
to a secure key. Below is a command to generate a secure key.openssl rand -base64 32
Variable | Description | Service |
---|---|---|
POSTGRES_USER | The user of the database. (Default is fine) | postgres |
POSTGRES_PASSWORD | The password of the database. (Default is fine) | postgres |
POSTGRES_DB | The name of the database. (Default is fine) | postgres |
ADMIN_KEY | The admin key for the Corlink API. | corlink-server |
DB_HOST | The host of the database. LEAVE DEFAULT | corlink-server |
DB_USER | The user of the database. (default value is fine) | corlink-server |
DB_PASSWORD | The password of the database. (default value is fine) | corlink-server |
DB_NAME | The name of the database. (default value is fine) | corlink-server |
DB_PORT | The port of the database. (default value is fine) | corlink-server |
DISCORD_TOKEN | A discord token associated with a bot. (See setup here) | corlink-bot |
GUILD_ID | The guild ID of the discord server. | corlink-bot |
LICENSING_SERVER_URL | The URL of the licensing server. (Default is fine) | corlink-bot |
LICENSING_SERVER_TOKEN | The token of the licensing server. (Default is fine) | corlink-bot |
OWNER_ID | The owner ID of the discord bot (or the server). | corlink-bot |
- Run the
docker-compose.yml
file.
docker-compose up -d
- You should now have a full instance of Corlink running.
Manual
This is the manual way of setting up Corlink. It is not recommended, but it is possible.
Prerequisites
Steps
- Clone the Corlink repository.
git clone https://github.com/ruby-network/corlink.git
- Setup the database.
cd corlink
psql -U postgres -c "CREATE DATABASE corlink;"
psql -U postgres -c "CREATE USER corlink WITH PASSWORD 'corlink';"
psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE corlink TO corlink;"
- Run the makefile.
make
- Follow specific instructions for the bot and server.
- Start Services (in other guides).