version: '3.1'

services:
    backend:
        image: registry.bbr-dev.info/holiday-api/backend:latest
        restart: on-failure
        depends_on:
            - database
        ports:
            - "5281:5281"
        networks:
            - holiday
        env_file:
            - .env.docker

    database:
        image: postgres:14
        ports:
            - "5432:5432"
        environment:
            - POSTGRES_USER=holiday
            - POSTGRES_PASSWORD=holidayPassword
            - POSTGRES_DB=holiday
        networks:
            - holiday

networks:
    holiday: