Skip to content

Run with Docker

Alin Sorin Nedelcu edited this page Nov 3, 2020 · 2 revisions

Create files

  1. You need to create the log files that will be shared with the container and be persistent.
touch combined.log
touch error.log
  1. Configure Firebase project if you didn't have, and then save your Firebase config in .json format and named firebase.json, this file has the following format:
{
  "apiKey": "YOUR_OWN_VALUE_HERE",
  "authDomain": "YOUR_PROJECT.firebaseapp.com",
  "databaseURL": "YOUR_PROJECT.firebaseio.com",
  "projectId": "YOUR_PROJECT",
  "storageBucket": "YOUR_PROJECT.appspot.com",
  "messagingSenderId": "YOUR_OWN_VALUE_HERE",
  "appId": "YOUR_OWN_VALUE_HERE"
}
  1. You also need a folder to persist tdlib database and files.
mkdir .tdlib_files

Run, stop and remove container

Download image

docker pull ghcr.io/luksireiku/polaris-js:latest

First run with docker.

docker run  \
  -v $PWD/error.log:/usr/src/app/error.log \
  -v $PWD/combined.log:/usr/src/app/combined.log \
  -v $PWD/firebase.json:/usr/src/app/firebase.json \
  -v $PWD/.tdlib_files:/usr/src/app/.tdlib_files \
  -ti -d --restart unless-stopped \
  --name polaris-js \
  ghcr.io/polaris/polaris-js

Stop running container

docker stop polaris-js

Run container

If you stopped the container, you can run it again without downloading and creating it again, just use this.

docker run polaris-js

Remove container

If you stopped the container, you can remove it if you don't want it anymore

docker rm polaris-js