version: '3'
services:
    web:
        container_name: site
        build: site/.
        ports:
            - "5000:5000"
        depends_on:
            - "couchdb"

    worker:
        container_name: worker
        build: worker/.
        command: celery -A tasks worker --beat --loglevel=info
        depends_on:
            - "rabbitmq"
            - "couchdb"
    
    rabbitmq:
        image: rabbitmq

    couchdb:
        image: couchdb
        logging:
            driver: none

version: '3'
services:
    web:
        container_name: site
        build: site/.
        ports:
            - "5000:5000"
        depends_on:
            - "couchdb"
        deploy:
            restart_policy:
                condition: always

    worker:
        container_name: worker
        build: worker/.
        command: celery -A tasks worker --beat --loglevel=info
        depends_on:
            - "rabbitmq"
            - "couchdb"
        deploy:
            restart_policy:
                condition: always
    
    rabbitmq:
        image: rabbitmq
        deploy:
            restart_policy:
                condition: always

    couchdb:
        image: couchdb
        logging:
            driver: none
        deploy:
            restart_policy:
                condition: always

Add restart always to compose file
Add restart always to compose file
