'How to connect to external and bridge network while using a specific IP address for a container in docker-compose?

I would like to achieve the following: bridged network=> bridged with DHCP bridged network=> internal 172.28.0.0/16

and I want a container to be connected to both of these networks while specifying a static IP for the internal network

Here is my attempt:

version: '3'
services:
  container1:
    container_name: container_1
    image: instance1
    networks:
      bridged_network1:
      bridged_network2:
        ipv4_address: 172.28.0.3


networks:
  bridged_network1:
    external: true
  bridged_network2:
    driver: bridge
    ipam:
      config:
        - subnet: 172.28.0.0/16

I receive the following error:

ERROR: yaml.parser.ParserError: while parsing a block collection
  in "./docker-compose.yml", line 7, column 7
expected <block end>, but found '?'
  in "./docker-compose.yml", line 8, column 7


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source