Sign inSign up

katrocitus/rust-apps

By katrocitus

Updated over 5 years ago

my rust apps

Image
0

292

katrocitus/rust-apps repository overview

Bot ID: 1748597399:AAG7tQJwD34wykOIwxuTemUchsL2xM-HbcU

Name: Twitter Virus bot

curl "https://api.telegram.org/bot1748597399:AAG7tQJwD34wykOIwxuTemUchsL2xM-HbcU/setWebhook?url=https://adfc994cbe9e1c.localhost.run"

Notes

  1. Uses Rocket master (stable Rust)
  2. Full async

Docker build

docker build . -t telegram-virus-bot-rs:latest
docker run -it --rm -p 8080:8080 telegram-virus-bot-rs:latest

Deploy command

gcloud beta run deploy telegram-rs-virus-bot --source . --platform managed --allow-unauthenticated --project phonic-aquifer-216003

hyper-tls error in Dockerfile in musl

reqwest fails in debian

build locally and push

docker build . -t katrocitus/rust-apps:macosbuild -f Dockerfile.working
docker push katrocitus/rust-apps:macosbuild

Final dockerfile for deployment

FROM katrocitus/rust-apps:macosbuild
WORKDIR /usr/src/app
CMD ["./telegram-virus-bot-rs"]

Twurl

twurl "/1.1/search/tweets.json?q=%23julialang&result_type=recent&count=10&lang=en" | jq ".statuses[].text"

https://github.com/jnferner/rich-uncle-pennybags-bot/blob/f1a918692dc5efc79a2536dea1443597e158bf4f/src/bot.rs

Tried to deploy to Cloud RUN - HTTPS error

The only working version is Dockerfile.working

Tag summary

Content type

Image

Digest

Size

32.7 MB

Last updated

over 5 years ago

docker pull katrocitus/rust-apps