version: '3.7'
services:
  mongodb:
    image: 'mongo'
    restart: 'always'
    ports: 
      - 27017:27017
    networks:
      - mongo_net
  server:
    depends_on:
      - mongodb
    networks:
      - mongo_net
    links:
        - mongodb
    ports: 
      - 1235:1235
    build: .
networks:
  mongo_net:
    driver: bridge
