services:
# The Django Web Application
    web:
        build: .
        container_name: card-players-unite-web
        ports:
            - "8000:8000"
        volumes:
            - .:/home/app/webapp
        environment:
            - POSTGRES_DB=maverickdb
            - POSTGRES_USER=maverickdb
            - POSTGRES_PASSWORD=maverickdb
            - POSTGRES_HOST=card-players-unite-postgres
        depends_on:
            - card-players-unite-postgres

    card-players-unite-postgres:

        container_name: card-players-unite-postgres
        
        image: postgres:14.1-alpine

        restart: unless-stopped

        ports:

            - 5432:5432

        environment: 

            - POSTGRES_DB=maverickdb

            - POSTGRES_USER=maverickdb

            - POSTGRES_PASSWORD=maverickdb

##        volumes: 
##
##            - /tmp/volume-data-postgres:/var/lib/postgresql/data
 
    card-players-unite-pgadmin:

        container_name: card-players-unite-pgadmin

        image: dpage/pgadmin4

        depends_on:

            - card-players-unite-postgres
        
        ports:
        
            - "5480:80"
            
        environment:
        
            PGADMIN_DEFAULT_EMAIL: lorem@loremipsum.com
            
            PGADMIN_DEFAULT_PASSWORD: maverickdb

##        volumes:
##        
##           - /tmp/volume-data-pgadmin4:/var/lib/pgadmin            
