version: "3.7"

services:
    postgres:
        image: postgres:13-alpine
        restart: unless-stopped
        volumes:
            - pg-data:/var/lib/postgresql/data
        env_file: ./.env
        ports:
            - "5432:5432"
        tty: true

    redis:
        image: redis:6-alpine
        command: >
            --maxmemory-policy noeviction
        restart: unless-stopped
        volumes:
            - redis-data:/data
        ports:
            - "6379:6379"
        tty: true


volumes:
    pg-data:
    redis-data: