detransport_ternopil_telegram
detransport_ternopil_telegram
Source code for https://t.me/DetransportTernopilBot
Installation
Requirements
- Crystal
- PostgreSQL
Clone repository:
git clone https://github.com/mamantoha/detransport_tenopil_telegram.git
Setup Telegram
Copy .env.example
to .env
and set variables
Setup Database
psql -c 'CREATE DATABASE detransport_ternopil_development;' -U postgres
crystal ./src/db.cr migrate
Run
shards build --release
./bin/detransport_telegram
Deployment
Linux with systemd
Create /etc/systemd/system/detransport_ternopil_telegram.service
[Unit]
Description=Detransport Ternopil Telegram service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=user
WorkingDirectory=/path/to/detransport_tenopil_telegram
ExecStart=/path/to/detransport_ternopil_telegram/bin/detransport_telegram &>/dev/null &
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target
sudo systemctl enable detransport_tenopil_telegram.service
sudo systemctl start detransport_ternopil_telegram
Development
crystal ./src/db.cr generate migration add_field_to_table
crystal ./src/db.cr migrate
crystal ./src/db.cr migrate rollback
Contributing
- Fork it (https://github.com/mamantoha/detransport_telegram/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Anton Maminov - creator and maintainer
Repository
detransport_ternopil_telegram
Owner
Statistic
- 5
- 0
- 0
- 0
- 11
- 7 months ago
- June 7, 2019
License
MIT License
Links
Synced at
Thu, 21 Nov 2024 13:34:45 GMT
Languages