Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
add test service to docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
jiakai-li committed Sep 9, 2024
1 parent 16f9e33 commit 3b3f5ed
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,32 @@ services:
ports:
- "80:8000"
environment:
- REDIS_URL=redis://redis:6379
REDIS_URL: "redis://redis:6379"
networks:
- backend-network
depends_on:
- redis
command: "gunicorn page_tracker.app:app --bind 0.0.0.0:8000"

test:
profiles:
- testing
build:
context: ./web
dockerfile: Dockerfile.dev
environment:
REDIS_URL: "redis://redis:6379"
FLASK_URL: "http://web:8000"
networks:
- backend-network
depends_on:
- redis
- web
command: >
sh -c 'python -m pytest test/e2e/ -vv
--redis-url $$REDIS_URL
--flask-url $$FLASK_URL'
networks:
backend-network:

Expand Down

0 comments on commit 3b3f5ed

Please sign in to comment.