This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from flask import Flask | |
| EXTERNAL_SERVICE_KEY = os.environ.get('EXTERNAL_SERVICE_KEY') | |
| app = Flask(__name__) | |
| @app.route("/") | |
| def index(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM python:latest | |
| COPY ./requirements.txt /app/requirements.txt | |
| WORKDIR /app | |
| RUN pip install -r requirements.txt | |
| COPY . /app | |
| CMD gunicorn app:app -b 0.0.0.0:80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.0' | |
| services: | |
| app: | |
| image: ${IMAGE_APP_TAG} | |
| build: ./app/ | |
| environment: | |
| # stage or prod specific | |
| - EXTERNAL_SERVICE_KEY=${EXTERNAL_SERVICE_KEY} | |
| # general one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask, request | |
| import telegram | |
| import os | |
| import json | |
| TOKEN = os.environ['TOKEN'] | |
| bot = telegram.Bot(token=TOKEN) | |
| app = Flask(__name__) |
NewerOlder