38 lines
631 B
YAML
38 lines
631 B
YAML
|
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
|
||
|
|
||
|
environment:
|
||
|
REDISURL: "redis://redis:6379/0"
|
||
|
|
||
|
build:
|
||
|
context: .
|
||
|
dockerfile: ./docker/app/Dockerfile
|
||
|
|
||
|
ports:
|
||
|
- 8080:5000
|
||
|
|
||
|
depends_on:
|
||
|
redis:
|
||
|
condition: service_healthy
|
||
|
|
||
|
volumes:
|
||
|
- ./flask_demo_api:/usr/src/flask-demo-api/flask_demo_api
|
||
|
|
||
|
command: /bin/bash -c 'poetry run app'
|