shihxuancheng 5 years ago
parent
commit
cdc6f7ca4b
3 changed files with 33 additions and 0 deletions
  1. 2
      back_end/Dockerfile
  2. 5
      back_end/bot_app.py
  3. 26
      back_end/docker-compose.yml

2
back_end/Dockerfile

@ -8,4 +8,6 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8080
CMD [ "python", "./bot_app.py" ]

5
back_end/bot_app.py

@ -8,6 +8,11 @@ from queue import Queue
app = Flask(__name__)
result = None
@app.route('/')
def sayHi():
return 'Hello World1!!!'
@app.route("/short_call",methods=['GET','POST'])
def five_secend_call():
global result

26
back_end/docker-compose.yml

@ -0,0 +1,26 @@
version: "3.2"
services:
www_proxy:
container_name: www_proxy
image: wernight/ngrok
networks:
- backend
depends_on:
- www_backend
ports:
- "4040:4040"
environment:
NGROK_AUTH: 326sUdHt1VQm92Y1ckLij_PMvbX8hA6v59QpB6tY8S
NGROK_PORT: "app:8080"
NGROK_REGION: ap
# command: ngrok http www_backend:8080
www_backend:
container_name: app
image: shihxuancheng/qa_bot
networks:
- backend
networks:
backend:
Loading…
Cancel
Save