|
services: |
|
api: |
|
image: flask_api |
|
container_name: ml_api |
|
build: |
|
context: ./api |
|
target: build |
|
ports: |
|
- "8000:5000" |
|
depends_on: |
|
- redis |
|
- model |
|
volumes: |
|
- ./uploads:/src/uploads |
|
environment: |
|
POSTGRES_DB: $POSTGRES_DB |
|
POSTGRES_USER: $POSTGRES_USER |
|
POSTGRES_PASSWORD: $POSTGRES_PASSWORD |
|
DATABASE_HOST: $DATABASE_HOST |
|
SECRET_KEY: $SECRET_KEY |
|
networks: |
|
- shared_network |
|
|
|
redis: |
|
image: redis:6.2.6 |
|
networks: |
|
- shared_network |
|
|
|
db: |
|
image: postgres:latest |
|
container_name: postgres_db |
|
environment: |
|
POSTGRES_DB: $POSTGRES_DB |
|
POSTGRES_USER: $POSTGRES_USER |
|
POSTGRES_PASSWORD: $POSTGRES_PASSWORD |
|
volumes: |
|
- postgres_data:/var/lib/postgresql/data |
|
ports: |
|
- "5432:5432" |
|
networks: |
|
- shared_network |
|
|
|
model: |
|
image: ml_service |
|
container_name: ml_service |
|
build: |
|
context: ./model |
|
dockerfile: ./Dockerfile |
|
depends_on: |
|
- redis |
|
volumes: |
|
- ./uploads:/src/uploads |
|
networks: |
|
- shared_network |
|
|
|
ui: |
|
image: ml_ui |
|
container_name: ml_ui |
|
build: |
|
context: ./ui |
|
target: build |
|
ports: |
|
- "9090:9090" |
|
depends_on: |
|
- api |
|
environment: |
|
- API_HOST=api |
|
- API_PORT=5000 |
|
networks: |
|
- shared_network |
|
|
|
networks: |
|
shared_network: |
|
external: true |
|
|
|
volumes: |
|
postgres_data: |
|
|