services:
    web:
#      image: timonepac872/timcash-backend
      build: ./config/
#      command: python /app/main.py
      restart: always
      command: python main.py
      depends_on:
        - database
      volumes:
        - ./config/.env:/app/.env
      ports:
        - '8081:8001'
      networks:
        - teamcash_net

    database:
      image: postgres:15
      restart: always
      volumes:
        - ./data:/var/lib/postgresql/data
#    ports:
#      - "2432:5432"
      environment:
        - POSTGRES_USER
        - POSTGRES_PASSWORD
        - POSTGRES_DB
      networks:
        - teamcash_net

networks:
  teamcash_net:
   # Use a custom driver
   driver: bridge
   ipam:
    config:
     - subnet: 193.0.1.32/29
       gateway: 193.0.1.36
