Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Start Docker Compose
run: docker compose up -d
- name: Docker Build
run: docker compose build

- name: Check /health endpoint returns 200
run: curl -fs http://localhost:8080/health
- name: Start Docker Compose
# start the docker contianer and wait 10 sec for container to be healty
run: docker compose up -d --wait --wait-timeout 10

- name: Show Docker logs (on failure)
if: failure()
run: docker compose logs
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ COPY static ./static
COPY templates ./templates
COPY backend ./backend
RUN pip install -r backend/requirements.txt
RUN apt-get -y update; apt-get -y install curl
EXPOSE 8080/tcp
ENV ENV_NAME=PROD
ENV PYTHONUNBUFFERED=1
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ services:
build: .
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 3s
timeout: 10s
retries: 3
start_period: 2s