
version: '2'
services:
    backend:
        image: {{image}}
        extends:
            file: common.yml
            service: backend
        depends_on:
            - db
        ports: 
            - "{{port}}:8000"
    db:
        image: postgres:9
        container_name: {{db_name}}
        environment:
            - POSTGRES_USER={{postgres_user}}
            - POSTGRES_PASSWORD={{postgres_pass}}



version: '2'
services:
    backend:
        image: {{image}}
        extends:
            file: common.yml
            service: backend
        depends_on:
            - db
        ports: 
            - "{{port}}:8000"
    db:
        image: postgres:9
        container_name: {{db_name}}
        environment:
            - POSTGRES_USER={{postgres_user}}
            - POSTGRES_PASSWORD={{postgres_pass}}
    fixture:
        image: {{image}}
        depends_on:
            - db
        command: |
            bash -c "\
            /tmp/wait-for-it.sh -h db -p 5432 && \
            ./manage.py makemigrations && \
            ./manage.py migrate && \
            ./manage.py loaddata calories/fixtures/food.json && \
            echo Database migrations done!!"



Add fixture to deploy compose
Add fixture to deploy compose
