Skip to content

Commit

Permalink
Merge pull request #25 from meedan/devops-471-long-running-http
Browse files Browse the repository at this point in the history
DEVOPS-471 add long running HTTP that is confirmed to work locally, specify ARM architecture, expose port
  • Loading branch information
DGaffney authored Aug 16, 2023
2 parents 22cef39 + 1407363 commit f65c181
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM python:3.9

EXPOSE 8000
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive

Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.PHONY: run run_http run_worker run_test

run:
uvicorn main:app --reload &
python run.py &
wait
run:
./start_healthcheck_and_model_engine.sh

run_http:
uvicorn main:app --reload
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: '3.9'
services:
app:
platform: linux/amd64
build: .
env_file:
- ./local.env
Expand Down
8 changes: 8 additions & 0 deletions start_healthcheck_and_model_engine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# Start the first process in the background
uvicorn main:app --reload &

# Start the second process in the foreground
# This will ensure the script won't exit until this process does
python run.py

0 comments on commit f65c181

Please sign in to comment.