Dash-Annotations
Dash-Annotations copied to clipboard
The source code for the Dash annotations server
Dash Annotations Server
Follow these instructions if you want to set up your own annotation server for Dash.
Installation
- Install Lumen
- Add a MySQL database called "annotations"
- Clone this repo over your Lumen install
- Rename the
.env.example
file to.env
and edit it - Run
composer install
- Install Python and Pygments (used for syntax highlighting)
- Make sure
/bin/pygmentize
exists. If it doesn't, add a link between/bin/pygmentize
to wherever you installed Pygments
- Make sure
- Run
php artisan migrate
and typeY
to confirm you want to do it in production - Open
http://{your_server}/users/logout
in your browser and check if you get a JSON response that says you're not logged in - Let Dash know about your server by running this command in Terminal:
# Repeat on every Mac that will connect to your server:
defaults write com.kapeli.dashdoc AnnotationsCustomServer "http(s)://{your_server}"
# To go back to the default server:
defaults delete com.kapeli.dashdoc AnnotationsCustomServer
- If you encounter any issues, let me know!
Docker
- Clone this repo
- Build the image:
docker-compose build
- Generate your GitHub Token and add it to
docker-compose.yml
- Set your
APP_KEY
indocker-compose.yml
- Start the service:
docker-compose up -d
- Add
ProxyNginx.conf
to your nginx sites and edit yourserver_name
- Open
http://dash.{your_server}/users/logout
in your browser and check if you get a JSON response that says you're not logged in - Let Dash know about your server by running this command in Terminal:
# Repeat on every Mac that will connect to your server:
defaults write com.kapeli.dashdoc AnnotationsCustomServer "http(s)://dash.{your_server}"
# To go back to the default server:
defaults delete com.kapeli.dashdoc AnnotationsCustomServer
- If you encounter any issues, let me know!
Dokku
https://github.com/dokku-alt/dokku-alt
-
Clone this repo
-
Create remote for dokku:
git remote add dokku dokku@{your_server}:dash
-
Create the app:
ssh -t dokku@{your_server} create dash
-
Create the database:
ssh -t dokku@{your_server} mariadb:create dash-db
-
Link database:
ssh -t dokku@{your_server} mariadb:link dash dash-db
-
Get the database credentials:
ssh -t dokku@{your_server} mariadb:info dash dash-db
-
Create environmental variables:
sh -t dokku@{your_server} config:set dash \ PP_ENV=production \ PP_FALLBACK_LOCAL=en \ PP_KEY=SomeRandomKey! \ PP_LOCALE=en \ ACHE_DRIVER=file \ B_CONNECTION=mysql \ B_DATABASE=dash-db \ B_HOST=mariadb \ B_PASSWORD=YourPassword \ B_USERNAME=dash \ UEUE_DRIVER=file \ ESSION_DRIVER=file
-
Push to dokku:
git push dokku dokku:master
-
Get your server's URL:
ssh -t dokku@{your_server} url dash
-
Open
http://dash.{your_server}/users/logout
in your browser and check if you get a JSON response that says you're not logged in -
Let Dash know about your server by running this command in Terminal:
# Repeat on every Mac that will connect to your server:
defaults write com.kapeli.dashdoc AnnotationsCustomServer "http(s)://dash.{your_server}"
# To go back to the default server:
defaults delete com.kapeli.dashdoc AnnotationsCustomServer
- If you encounter any issues, let me know!