flask-demo-api/compose-app.yml

38 lines
631 B
YAML
Raw Normal View History

2024-04-15 04:02:47 +03:00
version: "3.8"
services:
redis:
container_name: redis_demo
image: redis:7.2.4-alpine3.19
ports:
- '6380:6379'
healthcheck:
test: [ "CMD", "redis-cli","ping" ]
interval: 10s
timeout: 5s
retries: 5
app:
container_name: flask_demo
2024-04-16 04:48:10 +03:00
environment:
REDISURL: "redis://redis:6379/0"
2024-04-15 04:02:47 +03:00
build:
context: .
2024-04-16 04:48:10 +03:00
dockerfile: ./docker/app/Dockerfile
2024-04-15 04:02:47 +03:00
ports:
- 8080:5000
depends_on:
redis:
condition: service_healthy
volumes:
- ./flask_demo_api:/usr/src/flask-demo-api/flask_demo_api
2024-04-16 04:48:10 +03:00
command: /bin/bash -c 'poetry run app'