Public transport in Lviv 🇺🇦
MIT License
Source code for https://t.me/DetransportBot
Clone repository:
git clone https://github.com/mamantoha/detransport_lviv_telegram.git
Copy .env.example
to .env
and set variables
Copy config/database.yml.example
to config/database.yml
and set PostgreSQL variables
crystal sam.cr db:setup
crystal sam.cr db:migrate
shards build --release --production
./bin/detransport_telegram
$ crystal sam.cr generate:migration ChangeUserId
./db/migrations/20220709130450248_change_user_id.cr was successfully created.
To update ./src/detransport_telegram/data/lviv_stops.json
run:
crystal ./utils/update_stops.cr
Create /etc/systemd/system/detransport_lviv_telegram.service
[Unit]
Description=Detransport Lviv Telegram service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=user
WorkingDirectory=/path/to/detransport_lviv_telegram
ExecStart=/path/to/detransport_lviv_telegram/bin/detransport_telegram &>/dev/null &
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target
sudo systemctl enable detransport_lviv_telegram
sudo systemctl start detransport_lviv_telegram
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)