Skip to content

Latest commit

 

History

History
117 lines (95 loc) · 4.55 KB

README.md

File metadata and controls

117 lines (95 loc) · 4.55 KB

docker-telegram-bot

A flask based telegram bot docker container.

build passing

Image tags

  • python3.6-stretch-port
  • python3.6-stretch-socket
  • python3.6-stretch-port-onbuild
  • python3.6-stretch-socket-onbuild
  • python3.6.10-stretch-port
  • python3.6.10-stretch-socket
  • python3.6.10-stretch-port-onbuild
  • python3.6.10-stretch-socket-onbuild
  • python3.7-stretch-port
  • python3.7-stretch-socket
  • python3.7-stretch-port-onbuild
  • python3.7-stretch-socket-onbuild
  • python3.7.7-stretch-port
  • python3.7.7-stretch-socket
  • python3.7.7-stretch-port-onbuild
  • python3.7.7-stretch-socket-onbuild
  • python3.8-buster-port
  • python3.8-buster-socket
  • python3.8-buster-port-onbuild
  • python3.8-buster-socket-onbuild
  • python3.8.2-buster-port
  • python3.8.2-buster-socket
  • python3.8.2-buster-port-onbuild
  • python3.8.2-buster-socket-onbuild

See https://hub.docker.com/r/luckydonald/telegram-bot/tags for a list of existing image builds.

For version pinning we serve the image with the following tag structure:

  • python{version}-{flavor}-port
    • python{version}-{flavor}-port-{commit}
    • python{version}-{flavor}-port-{YYYY-MM-DD}
    • python{version}-{flavor}-port-{YYYY-MM-DD}-{commit}
  • python{version}-{flavor}-port-onbuild
    • python{version}-{flavor}-port-{commit}-onbuild
    • python{version}-{flavor}-port-{YYYY-MM-DD}-onbuild
    • python{version}-{flavor}-port-{YYYY-MM-DD}-{commit}-onbuild
  • python{version}-{flavor}-socket
    • python{version}-{flavor}-socket-{commit}
    • python{version}-{flavor}-socket-{YYYY-MM-DD}
    • python{version}-{flavor}-socket-{YYYY-MM-DD}-{commit}
  • python{version}-{flavor}-socket-onbuild
    • python{version}-{flavor}-socket-{commit}-onbuild
    • python{version}-{flavor}-socket-{YYYY-MM-DD}-onbuild
    • python{version}-{flavor}-socket-{YYYY-MM-DD}-{commit}-onbuild

The same with -port instead of -socket

Need something else? Create an issue!

Environment variables

HEALTHCHECK_URL:

Which url to call? Default: /healthcheck

SOCKET_PATH: (Only the socket image flavor)

Allows to overwrite the place where we expect the socket. Default: /sockets/bots/${URL_PATH}.sock

SOCKET_TYPE: (Only the socket image flavor)

Allows to overwrite the type of the file socket to use. All options ending on *-socket.

Currently that's uwsgi, http, https, as well as the lesser known , suwsgi, ssl, http11, fastcgi, fastcgi-nph, scgi, scgi-nph, rawand finallypuwsgi`.

Default: uwsgi

HTTP_PORT: (Only the port image flavor)

Allows to overwrite the http port we're listening on. Default: 8080

How to update the containers

I'll do that, don't worry. But as I myself always forget how to, I'll write it down anyway:

Mac OS requirements

Gets you a better sed and as well as working sort. Actually some other great programs are also included, fully for free!

$ brew install gnu-sed coreutils
$ new_path='PATH="/usr/local/opt/gnu-sed/libexec/gnubin:/usr/local/opt/coreutils/libexec/gnubin:$PATH"'
$ echo $new_path >> ~/.bashrc
$ eval $new_path
adding new versions

Those are simply done by creating new folders.

rm -r python*

mkdir -p python3.{6{,.10},7{,.7}}/stretch/{port,socket}{,/onbuild}
mkdir -p python3.8{,.2}/buster/{port,socket}{,/onbuild}
Just do it!

Execute the script, and push it to github. Travis will build containers.

$ bash update.sh

After looking at the updated Dockerfiles and the .travis.yml let's git gud.

$ git add -u
$ git commit -m "Updated to latest version"
$ git push

That's it. Wait for Sir Travis to be done.