From 52766161b203d1d21f6da4c266530655ab328b34 Mon Sep 17 00:00:00 2001 From: 0x46616c6b <0x46616c6b@users.noreply.github.com> Date: Sun, 5 May 2024 16:28:08 +0000 Subject: [PATCH] Deployed fe8f2bc with MkDocs version: 1.4.2 --- .nojekyll | 0 404.html | 429 ++ api/index.html | 478 ++ api/swagger.yaml | 178 + assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.51d95adb.min.js | 29 + assets/javascripts/bundle.51d95adb.min.js.map | 8 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.e5c33ebb.min.js | 42 + .../workers/search.e5c33ebb.min.js.map | 8 + assets/logo.png | Bin 0 -> 5571 bytes assets/stylesheets/main.558e4712.min.css | 1 + assets/stylesheets/main.558e4712.min.css.map | 1 + assets/stylesheets/palette.2505c338.min.css | 1 + .../stylesheets/palette.2505c338.min.css.map | 1 + assets/ticker-api.service | 17 + configuration/index.html | 506 ++ index.html | 556 ++ migration/index.html | 538 ++ quick-install-all/index.html | 785 ++ quick-install/index.html | 750 ++ search/search_index.json | 1 + sitemap.xml | 33 + sitemap.xml.gz | Bin 0 -> 201 bytes swagger.yaml | 178 + 52 files changed, 11735 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 api/index.html create mode 100644 api/swagger.yaml create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.51d95adb.min.js create mode 100644 assets/javascripts/bundle.51d95adb.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.e5c33ebb.min.js create mode 100644 assets/javascripts/workers/search.e5c33ebb.min.js.map create mode 100644 assets/logo.png create mode 100644 assets/stylesheets/main.558e4712.min.css create mode 100644 assets/stylesheets/main.558e4712.min.css.map create mode 100644 assets/stylesheets/palette.2505c338.min.css create mode 100644 assets/stylesheets/palette.2505c338.min.css.map create mode 100644 assets/ticker-api.service create mode 100644 configuration/index.html create mode 100644 index.html create mode 100644 migration/index.html create mode 100644 quick-install-all/index.html create mode 100644 quick-install/index.html create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 swagger.yaml diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..a3f059bd --- /dev/null +++ b/404.html @@ -0,0 +1,429 @@ + + + +
+ + + + + + + + + + + + + + + +Information
+The API Specification only contains the public endpoints at the moment.
+# listen binds ticker to specific address and port
+listen: "localhost:8080"
+# log_level sets log level for logrus
+log_level: "error"
+# log_format sets log format for logrus (default: json)
+log_format: "json"
+# configuration for the database
+database:
+ type: "sqlite" # postgres, mysql, sqlite
+ dsn: "ticker.db" # postgres: "host=localhost port=5432 user=ticker dbname=ticker password=ticker sslmode=disable"
+# secret used for JSON Web Tokens
+secret: "slorp-panfil-becall-dorp-hashab-incus-biter-lyra-pelage-sarraf-drunk"
+# telegram configuration
+telegram:
+ token: ""
+# listen port for prometheus metrics exporter
+metrics_listen: ":8181"
+upload:
+ # path where to store the uploaded files
+ path: "uploads"
+ # base url for uploaded assets
+ url: "http://localhost:8080"
+
+Note
+All configuration options can be set via environment variables.
+The following env vars can be used:
+TICKER_LISTEN
TICKER_LOG_FORMAT
TICKER_LOG_LEVEL
TICKER_DATABASE_TYPE
TICKER_DATABASE_DSN
TICKER_LOG_LEVEL
TICKER_INITIATOR
TICKER_SECRET
TICKER_TELEGRAM_TOKEN
TICKER_METRICS_LISTEN
TICKER_UPLOAD_PATH
TICKER_UPLOAD_URL
Service to distribute short messages in support of events, demonstrations, or other time-sensitive events.
+This repository contains the API for the Systemli Ticker Project.
+Requirements
+The project is written in Go. You should be familiar with the structure and organisation of the code. If not, there are +some good guides.
+Clone the project
+git clone https://github.com/systemli/ticker.git
+
+Start the project
+cd ticker
+go run . run
+
+Check the API
+curl http://localhost:8080/healthz
+
+Create a user
+go run . user create --email <email-address> --password <password> --super-admin
+
+go test ./...
+
+
+
+
+
+
+
+ Important
+In version 2.0.0 the database backend was changed from Storm to Gorm. This means you have to migrate +your database. The following steps will guide you through the process.
+Information
+Ensure you have the latest version of the ticker (>= 2.0.0
) service installed.
Configure the new database backend in config.yml
database:
+ type: "postgres" # postgres, mysql, sqlite
+ dsn: "host=localhost port=5432 user=ticker dbname=ticker password=ticker sslmode=disable"
+
+Start the migration
+ticker db migrate --storm.path /path/to/storm.db
+
+Start the ticker service
+This was tested with an Ubuntu 20.04 LTS server.
+Results may differ on other releases or distributions!
+git
go
nodejs
yarn
nginx
certbot
& python3-certbot-nginx
to use free Let's Encrypt Certs)git
Don't use the shipped version of your system, if you're working on a Debian based OS (Ubuntu, etc)
+Instead use: + golang.org install guide
+Please be also aware, that it's best practice to build your version of "ticker" not on the production machine. In order to keep the hurdle as low as possible, we will build the app on the system we're going to run it.
+To enhance security maybe you want to remove go
afterwards.
Don't use the shipped version of your system, if you're working on a Debian based OS (Ubuntu, etc)
+Instead use: + nodesource/distributions
+As mentioned above, this isn't best practice. +You can also build it from source on your dedicated build server, your own pc at home, etc. Then just scp it over to the production Server afterwards.
+cd /var/www/
+The directory where we gonna install all the thingsgit clone https://github.com/systemli/ticker
+Clone the repository onto your diskcd ticker
+Go into the just cloned repositorygo build -o build/ticker
+Build the applicationwget https://github.com/systemli/ticker/releases/download/<version>/ticker-<version>-<architecture>
mv ticker-<version>-<architecture> /var/www/ticker/ticker
chmod +x /var/www/ticker/ticker
vim config.yml
+Fill your config file with the following content:# listen binds ticker to specific address and port
+listen: "localhost:8080"
+# log_level sets log level for logrus
+log_level: "error"
+# configuration for the database
+database:
+ type: "sqlite" # postgres, mysql, sqlite
+ dsn: "ticker.db" # postgres: "host=localhost port=5432 user=ticker dbname=ticker password=ticker sslmode=disable"
+# secret used for JSON Web Tokens
+secret: "<your special little secret> (make it LOOOONG!)"
+# listen port for prometheus metrics exporter
+metrics_listen: ":8181"
+upload:
+ # path where to store the uploaded files
+ path: "uploads"
+ # base url for uploaded assets
+ url: "https://api.domain.tld"
+
+systemctl enable ticker-api.service
systemctl start ticker-api.service
systemctl status ticker-api.service
you'll see the generated admin password. Please change it immediately!vim /etc/nginx/sites-available/ticker-api
server {
+ listen 80;
+ listen [::]:80;
+ server_name api.domain.tld;
+ location / {
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_pass http://127.0.0.1:8080;
+ }
+}
+
+
+Create a symlink to enable this config:
+ln -s /etc/nginx/sites-available/ticker-api /etc/nginx/sites-enabled/
Now run nginx -t
to check if the config is correct.
If your output looks like this:
+nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
+nginx: configuration file /etc/nginx/nginx.conf test is successful
+
+then you can proceed. Otherwise: look for the error or ask someone to help.
+Run certbot --nginx --redirect -d api.domain.tld
to get a free SSL certificate. Please keep in mind, that you need to point the A
& AAAA
Records to your machine!
If you don't want to use certbot for your installation, please keep in mind, that nontheless you'll need an TLS cert for running this in production and need to configure the nginx accordingly by yourself!
+It should generate a certificate after answering a few questions like a email address, etc.
+done. This domain is now serving a ticker API. :)
+cd /var/www/
+The directory where we gonna install all the thingsgit clone https://github.com/systemli/ticker-admin
+Clone the repository onto your diskcd ticker-admin
+Go into the just cloned repositoryyarn
+Install the dependenciesvim .env
+Fill your .env file with the following content:REACT_APP_API_URL=https://api.domain.tld/v1
+
+Change api.domain.tld
to the URL you chose at ticker API server creation
yarn build
+Build the applicationchown www-data:www-data dist/ -R
+Sets the owner for the freshly created dist repository to your nginx uservim /etc/nginx/sites-available/ticker-admin
server {
+ listen 80;
+ listen [::]:80;
+ server_name admin.domain.tld;
+ root /var/www/ticker-admin/dist;
+ index index.html;
+ location / {
+ try_files $uri $uri/ =404;
+ }
+}
+
+
+Create a symlink to enable this config:
+ln -s /etc/nginx/sites-available/ticker-admin /etc/nginx/sites-enabled/
Now run nginx -t
to check if the config is correct.
If your output looks like this:
+nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
+nginx: configuration file /etc/nginx/nginx.conf test is successful
+
+then you can proceed. Otherwise: look for the error or ask someone to help.
+Run certbot --nginx --redirect -d admin.domain.tld
to get a free SSL certificate. Please keep in mind, that you need to point the A
& AAAA
Records to your machine!
If you don't want to use certbot for your installation, please keep in mind, that nontheless you'll need an TLS cert for running this in production and need to configure the nginx accordingly by yourself!
+It should generate a certificate after answering a few questions like a email address, etc.
+done. This domain is now serving a ticker frontend. :)
+You need to create the ticker in ticker-admin in order to see something!
+cd /var/www/
+The directory where we gonna install all the thingsgit clone https://github.com/systemli/ticker-frontend
+Clone the repository onto your diskcd ticker-frontend
+Go into the just cloned repositorygit checkout d03982f3059d6335a9e9ec0abcb71813ccbafef7
+Checkout this branch. Hopefully, this won't be necessary in the future, but right now, this seems to be the the last working commit (for me)yarn
+Install the dependenciesvim .env
+Fill your .env file with the following content:REACT_APP_API_URL=https://api.domain.tld/v1
+
+Change api.domain.tld
to the URL you chose at ticker API server creation
yarn build
+Build the applicationchown www-data:www-data dist/ -R
+Sets the owner for the freshly created dist repository to your nginx uservim /etc/nginx/sites-available/ticker-frontend
The following config is for a single domain only! For wildcard configs, just replace the sub.domain.tld
with a *.domain.tld
. You need to validate your domain via DNS challenge or use another provider then Let's Encrypt!
server {
+ listen 80;
+ listen [::]:80;
+ server_name sub.domain.tld;
+ root /var/www/ticker-frontend/dist;
+ index index.html;
+ location / {
+ try_files $uri $uri/ =404;
+ }
+}
+
+
+Create a symlink to enable this config:
+ln -s /etc/nginx/sites-available/ticker-frontend /etc/nginx/sites-enabled/
Now run nginx -t
to check if the config is correct.
If your output looks like this:
+nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
+nginx: configuration file /etc/nginx/nginx.conf test is successful
+
+then you can proceed. Otherwise: look for the error or ask someone to help.
+Run certbot --nginx --redirect -d sub.domain.tld
to get a free SSL certificate. Please keep in mind, that you need to point the A
& AAAA
Records to your machine!
If you don't want to use certbot for your installation, please keep in mind, that nontheless you'll need an TLS cert for running this in production and need to configure the nginx accordingly by yourself!
+It should generate a certificate after answering a few questions like a email address, etc.
+done. This domain is now serving a ticker frontend. :)
+You need to create the ticker in ticker-admin in order to see something!
+https://admin.domain.tld
and log in with the credentials provided at your first start of the ticker api.sub.domain.tld
https://sub.domain.tld
This is tested under Ubuntu 20.04 LTS
+We're assuming, that the ticker api will be available under the api.domain.tld
domain. Please change accordingly.
This should be considered a QUICK INSTALL GUIDE! Some best practices may differ.
+nginx
certbot
& python3-certbot-nginx
to use free Let's Encrypt Certs)git
go
Don't use the shipped version of your system, if you're working on a Debian based OS (Ubuntu, etc)
+Instead use: + golang.org install guide
+Please be also aware, that it's best practice to build your version of "ticker" not on the production machine. In order to keep the hurdle as low as possible, we will build the app on the system we're going to run it.
+To enhance security maybe you want to remove go
afterwards.
As mentioned above, this isn't best practice. +You can also build it from source on your dedicated build server, your own pc at home, etc. Then just scp it over to the production Server afterwards.
+cd /var/www/
+The directory where we gonna install all the thingsgit clone https://github.com/systemli/ticker
+Clone the repository onto your diskcd ticker
+Go into the just cloned repositorygo build -o build/ticker
+Build the applicationwget https://github.com/systemli/ticker/releases/download/<version>/ticker-<version>-<architecture>
mv ticker-<version>-<architecture> /var/www/ticker/ticker
chmod +x /var/www/ticker/ticker
vim config.yml
+Fill your config file with the following content:# listen binds ticker to specific address and port
+listen: "localhost:8080"
+# log_level sets log level for logrus
+log_level: "error"
+# configuration for the database
+database:
+ type: "sqlite" # postgres, mysql, sqlite
+ dsn: "ticker.db" # postgres: "host=localhost port=5432 user=ticker dbname=ticker password=ticker sslmode=disable"
+# secret used for JSON Web Tokens
+secret: "<your special little secret> (make it LOOOONG!)"
+# listen port for prometheus metrics exporter
+metrics_listen: ":8181"
+upload:
+ # path where to store the uploaded files
+ path: "uploads"
+ # base url for uploaded assets
+ url: "https://api.domain.tld"
+
+systemctl enable ticker-api.service
systemctl start ticker-api.service
systemctl status ticker-api.service
you'll see the generated admin password. Please change it immediately!In order to expose your ticker API to the users and not only yourself on the server, you'll need some sort of reverse proxy. +The following config expects you to use nginx, but apache2, caddy, etc. works just fine too.
+vim /etc/nginx/sites-available/ticker-api
This config is only for use with cerbot
! Please create a secure SSL config if you won't let certbot do the job!
server {
+ listen 80;
+ listen [::]:80;
+ server_name api.domain.tld;
+ location / {
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_pass http://127.0.0.1:8080;
+ }
+}
+
+
+This is an example config for using TLS/SSL without certbot:
+server {
+ server_name api.domain.tld;
+ location / {
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_pass http://127.0.0.1:8080;
+ }
+
+ listen [::]:443 ssl ipv6only=on;
+ listen 443 ssl;
+ ssl_certificate /etc/ssl/api.domain.tld-fullchain.pem;
+ ssl_certificate_key /etc/ssl/api.domain.tld-privkey.pem;
+ ssl_session_cache shared:le_nginx_SSL:10m;
+ ssl_session_timeout 1440m;
+ ssl_session_tickets off;
+
+ ssl_protocols TLSv1.2 TLSv1.3;
+ ssl_prefer_server_ciphers off;
+
+ ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA";
+
+}
+
+
+server {
+ return 301 https://$host$request_uri;
+
+ listen 80;
+ listen [::]:80;
+ server_name api.domain.tld;
+
+}
+
+
+Create a symlink to enable this config:
+ln -s /etc/nginx/sites-available/ticker-api /etc/nginx/sites-enabled/
Now run nginx -t
to check if the config is correct.
If your output looks like this:
+nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
+nginx: configuration file /etc/nginx/nginx.conf test is successful
+
+then you can proceed. Otherwise: look for the error or ask someone to help.
+Run certbot --nginx --redirect -d api.domain.tld
to get a free SSL certificate. Please keep in mind, that you need to point the A
& AAAA
Records to your machine!
It should generate a certificate after answering a few questions like a email address, etc.
+done. This domain is now serving a ticker API. :)
+ + + + + + +Service to distribute short messages in support of events, demonstrations, or other time-sensitive events.
This repository contains the API for the Systemli Ticker Project.
Requirements
The project is written in Go. You should be familiar with the structure and organisation of the code. If not, there are some good guides.
"},{"location":"#first-run","title":"First run","text":"Clone the project
git clone https://github.com/systemli/ticker.git\n
Start the project
cd ticker\ngo run . run\n
Check the API
curl http://localhost:8080/healthz\n
Create a user
go run . user create --email <email-address> --password <password> --super-admin\n
go test ./...\n
"},{"location":"api/","title":"API Specification","text":"Information
The API Specification only contains the public endpoints at the moment.
const ui = SwaggerUIBundle({ url: 'swagger.yaml', dom_id: '#swagger-ui', })"},{"location":"configuration/","title":"Configuration","text":"# listen binds ticker to specific address and port\nlisten: \"localhost:8080\"\n# log_level sets log level for logrus\nlog_level: \"error\"\n# log_format sets log format for logrus (default: json)\nlog_format: \"json\"\n# configuration for the database\ndatabase:\n type: \"sqlite\" # postgres, mysql, sqlite\n dsn: \"ticker.db\" # postgres: \"host=localhost port=5432 user=ticker dbname=ticker password=ticker sslmode=disable\"\n# secret used for JSON Web Tokens\nsecret: \"slorp-panfil-becall-dorp-hashab-incus-biter-lyra-pelage-sarraf-drunk\"\n# telegram configuration\ntelegram:\n token: \"\"\n# listen port for prometheus metrics exporter\nmetrics_listen: \":8181\"\nupload:\n # path where to store the uploaded files\n path: \"uploads\"\n # base url for uploaded assets\n url: \"http://localhost:8080\"\n
Note
All configuration options can be set via environment variables.
The following env vars can be used:
TICKER_LISTEN
TICKER_LOG_FORMAT
TICKER_LOG_LEVEL
TICKER_DATABASE_TYPE
TICKER_DATABASE_DSN
TICKER_LOG_LEVEL
TICKER_INITIATOR
TICKER_SECRET
TICKER_TELEGRAM_TOKEN
TICKER_METRICS_LISTEN
TICKER_UPLOAD_PATH
TICKER_UPLOAD_URL
Important
In version 2.0.0 the database backend was changed from Storm to Gorm. This means you have to migrate your database. The following steps will guide you through the process.
"},{"location":"migration/#migrate-from-storm-to-gorm","title":"Migrate from Storm to Gorm","text":"Information
Ensure you have the latest version of the ticker (>= 2.0.0
) service installed.
Configure the new database backend in config.yml
database:\n type: \"postgres\" # postgres, mysql, sqlite\n dsn: \"host=localhost port=5432 user=ticker dbname=ticker password=ticker sslmode=disable\"\n
Start the migration
ticker db migrate --storm.path /path/to/storm.db\n
Start the ticker service
This was tested with an Ubuntu 20.04 LTS server.
Results may differ on other releases or distributions!
"},{"location":"quick-install-all/#requirements","title":"Requirements","text":"git
go
nodejs
yarn
nginx
certbot
& python3-certbot-nginx
to use free Let's Encrypt Certs)git
Don't use the shipped version of your system, if you're working on a Debian based OS (Ubuntu, etc)
Instead use: golang.org install guide
Please be also aware, that it's best practice to build your version of \"ticker\" not on the production machine. In order to keep the hurdle as low as possible, we will build the app on the system we're going to run it. To enhance security maybe you want to remove go
afterwards.
Don't use the shipped version of your system, if you're working on a Debian based OS (Ubuntu, etc)
Instead use: nodesource/distributions
"},{"location":"quick-install-all/#install-ticker","title":"Install ticker","text":""},{"location":"quick-install-all/#build-from-source","title":"Build from source","text":"As mentioned above, this isn't best practice. You can also build it from source on your dedicated build server, your own pc at home, etc. Then just scp it over to the production Server afterwards.
cd /var/www/
The directory where we gonna install all the thingsgit clone https://github.com/systemli/ticker
Clone the repository onto your diskcd ticker
Go into the just cloned repositorygo build -o build/ticker
Build the applicationwget https://github.com/systemli/ticker/releases/download/<version>/ticker-<version>-<architecture>
mv ticker-<version>-<architecture> /var/www/ticker/ticker
chmod +x /var/www/ticker/ticker
vim config.yml
Fill your config file with the following content:# listen binds ticker to specific address and port\nlisten: \"localhost:8080\"\n# log_level sets log level for logrus\nlog_level: \"error\"\n# configuration for the database\ndatabase:\n type: \"sqlite\" # postgres, mysql, sqlite\n dsn: \"ticker.db\" # postgres: \"host=localhost port=5432 user=ticker dbname=ticker password=ticker sslmode=disable\"\n# secret used for JSON Web Tokens\nsecret: \"<your special little secret> (make it LOOOONG!)\"\n# listen port for prometheus metrics exporter\nmetrics_listen: \":8181\"\nupload:\n # path where to store the uploaded files\n path: \"uploads\"\n # base url for uploaded assets\n url: \"https://api.domain.tld\"\n
systemctl enable ticker-api.service
systemctl start ticker-api.service
systemctl status ticker-api.service
you'll see the generated admin password. Please change it immediately!vim /etc/nginx/sites-available/ticker-api
server {\n listen 80;\n listen [::]:80;\n server_name api.domain.tld;\n location / {\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_pass http://127.0.0.1:8080;\n }\n}\n\n
Create a symlink to enable this config: ln -s /etc/nginx/sites-available/ticker-api /etc/nginx/sites-enabled/
Now run nginx -t
to check if the config is correct.
If your output looks like this:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok\nnginx: configuration file /etc/nginx/nginx.conf test is successful\n
then you can proceed. Otherwise: look for the error or ask someone to help.
Run certbot --nginx --redirect -d api.domain.tld
to get a free SSL certificate. Please keep in mind, that you need to point the A
& AAAA
Records to your machine!
If you don't want to use certbot for your installation, please keep in mind, that nontheless you'll need an TLS cert for running this in production and need to configure the nginx accordingly by yourself!
It should generate a certificate after answering a few questions like a email address, etc.
done. This domain is now serving a ticker API. :)
"},{"location":"quick-install-all/#install-ticker-admin","title":"Install ticker-admin","text":"cd /var/www/
The directory where we gonna install all the thingsgit clone https://github.com/systemli/ticker-admin
Clone the repository onto your diskcd ticker-admin
Go into the just cloned repositoryyarn
Install the dependenciesvim .env
Fill your .env file with the following content:REACT_APP_API_URL=https://api.domain.tld/v1\n
Change api.domain.tld
to the URL you chose at ticker API server creation
yarn build
Build the applicationchown www-data:www-data dist/ -R
Sets the owner for the freshly created dist repository to your nginx uservim /etc/nginx/sites-available/ticker-admin
server {\n listen 80;\n listen [::]:80;\n server_name admin.domain.tld;\n root /var/www/ticker-admin/dist;\n index index.html;\n location / {\n try_files $uri $uri/ =404;\n }\n}\n\n
Create a symlink to enable this config: ln -s /etc/nginx/sites-available/ticker-admin /etc/nginx/sites-enabled/
Now run nginx -t
to check if the config is correct.
If your output looks like this:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok\nnginx: configuration file /etc/nginx/nginx.conf test is successful\n
then you can proceed. Otherwise: look for the error or ask someone to help.
Run certbot --nginx --redirect -d admin.domain.tld
to get a free SSL certificate. Please keep in mind, that you need to point the A
& AAAA
Records to your machine!
If you don't want to use certbot for your installation, please keep in mind, that nontheless you'll need an TLS cert for running this in production and need to configure the nginx accordingly by yourself!
It should generate a certificate after answering a few questions like a email address, etc.
done. This domain is now serving a ticker frontend. :)
You need to create the ticker in ticker-admin in order to see something!
"},{"location":"quick-install-all/#install-ticker-frontend","title":"Install ticker-frontend","text":"cd /var/www/
The directory where we gonna install all the thingsgit clone https://github.com/systemli/ticker-frontend
Clone the repository onto your diskcd ticker-frontend
Go into the just cloned repositorygit checkout d03982f3059d6335a9e9ec0abcb71813ccbafef7
Checkout this branch. Hopefully, this won't be necessary in the future, but right now, this seems to be the the last working commit (for me)yarn
Install the dependenciesvim .env
Fill your .env file with the following content:REACT_APP_API_URL=https://api.domain.tld/v1\n
Change api.domain.tld
to the URL you chose at ticker API server creation
yarn build
Build the applicationchown www-data:www-data dist/ -R
Sets the owner for the freshly created dist repository to your nginx uservim /etc/nginx/sites-available/ticker-frontend
The following config is for a single domain only! For wildcard configs, just replace the sub.domain.tld
with a *.domain.tld
. You need to validate your domain via DNS challenge or use another provider then Let's Encrypt!
server {\n listen 80;\n listen [::]:80;\n server_name sub.domain.tld;\n root /var/www/ticker-frontend/dist;\n index index.html;\n location / {\n try_files $uri $uri/ =404;\n }\n}\n\n
Create a symlink to enable this config: ln -s /etc/nginx/sites-available/ticker-frontend /etc/nginx/sites-enabled/
Now run nginx -t
to check if the config is correct.
If your output looks like this:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok\nnginx: configuration file /etc/nginx/nginx.conf test is successful\n
then you can proceed. Otherwise: look for the error or ask someone to help.
Run certbot --nginx --redirect -d sub.domain.tld
to get a free SSL certificate. Please keep in mind, that you need to point the A
& AAAA
Records to your machine!
If you don't want to use certbot for your installation, please keep in mind, that nontheless you'll need an TLS cert for running this in production and need to configure the nginx accordingly by yourself!
It should generate a certificate after answering a few questions like a email address, etc.
done. This domain is now serving a ticker frontend. :)
You need to create the ticker in ticker-admin in order to see something!
"},{"location":"quick-install-all/#first-touch","title":"First touch","text":"https://admin.domain.tld
and log in with the credentials provided at your first start of the ticker api.sub.domain.tld
https://sub.domain.tld
This is tested under Ubuntu 20.04 LTS
We're assuming, that the ticker api will be available under the api.domain.tld
domain. Please change accordingly.
This should be considered a QUICK INSTALL GUIDE! Some best practices may differ.
"},{"location":"quick-install/#requirements","title":"Requirements","text":"nginx
certbot
& python3-certbot-nginx
to use free Let's Encrypt Certs)git
go
Don't use the shipped version of your system, if you're working on a Debian based OS (Ubuntu, etc)
Instead use: golang.org install guide
Please be also aware, that it's best practice to build your version of \"ticker\" not on the production machine. In order to keep the hurdle as low as possible, we will build the app on the system we're going to run it. To enhance security maybe you want to remove go
afterwards.
As mentioned above, this isn't best practice. You can also build it from source on your dedicated build server, your own pc at home, etc. Then just scp it over to the production Server afterwards.
cd /var/www/
The directory where we gonna install all the thingsgit clone https://github.com/systemli/ticker
Clone the repository onto your diskcd ticker
Go into the just cloned repositorygo build -o build/ticker
Build the applicationwget https://github.com/systemli/ticker/releases/download/<version>/ticker-<version>-<architecture>
mv ticker-<version>-<architecture> /var/www/ticker/ticker
chmod +x /var/www/ticker/ticker
vim config.yml
Fill your config file with the following content:# listen binds ticker to specific address and port\nlisten: \"localhost:8080\"\n# log_level sets log level for logrus\nlog_level: \"error\"\n# configuration for the database\ndatabase:\n type: \"sqlite\" # postgres, mysql, sqlite\n dsn: \"ticker.db\" # postgres: \"host=localhost port=5432 user=ticker dbname=ticker password=ticker sslmode=disable\"\n# secret used for JSON Web Tokens\nsecret: \"<your special little secret> (make it LOOOONG!)\"\n# listen port for prometheus metrics exporter\nmetrics_listen: \":8181\"\nupload:\n # path where to store the uploaded files\n path: \"uploads\"\n # base url for uploaded assets\n url: \"https://api.domain.tld\"\n
systemctl enable ticker-api.service
systemctl start ticker-api.service
systemctl status ticker-api.service
you'll see the generated admin password. Please change it immediately!In order to expose your ticker API to the users and not only yourself on the server, you'll need some sort of reverse proxy. The following config expects you to use nginx, but apache2, caddy, etc. works just fine too.
vim /etc/nginx/sites-available/ticker-api
This config is only for use with cerbot
! Please create a secure SSL config if you won't let certbot do the job!
server {\n listen 80;\n listen [::]:80;\n server_name api.domain.tld;\n location / {\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_pass http://127.0.0.1:8080;\n }\n}\n\n
This is an example config for using TLS/SSL without certbot:
server {\n server_name api.domain.tld;\n location / {\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_pass http://127.0.0.1:8080;\n }\n\n listen [::]:443 ssl ipv6only=on;\n listen 443 ssl;\n ssl_certificate /etc/ssl/api.domain.tld-fullchain.pem;\n ssl_certificate_key /etc/ssl/api.domain.tld-privkey.pem;\n ssl_session_cache shared:le_nginx_SSL:10m;\n ssl_session_timeout 1440m;\n ssl_session_tickets off;\n\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_prefer_server_ciphers off;\n\n ssl_ciphers \"ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA\";\n\n}\n\n\nserver {\n return 301 https://$host$request_uri;\n\n listen 80;\n listen [::]:80;\n server_name api.domain.tld;\n\n}\n\n
Create a symlink to enable this config: ln -s /etc/nginx/sites-available/ticker-api /etc/nginx/sites-enabled/
Now run nginx -t
to check if the config is correct.
If your output looks like this:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok\nnginx: configuration file /etc/nginx/nginx.conf test is successful\n
then you can proceed. Otherwise: look for the error or ask someone to help.
Run certbot --nginx --redirect -d api.domain.tld
to get a free SSL certificate. Please keep in mind, that you need to point the A
& AAAA
Records to your machine!
It should generate a certificate after answering a few questions like a email address, etc.
done. This domain is now serving a ticker API. :)
"}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 00000000..aa454274 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,33 @@ + +