Lab 8 docker-compose alternative solution?

version: "3"
services:
  db:
    image : postgres
    environment :
      - POSTGRES_PASSWORD=mysecretpassword
    networks :
      - wpnet
  wordpress :
  image : wordpress
    ports :
      - 8085:80
    networks :
      - wpnet
networks : 
  wpnet:
    driver: bridge

Since the links key is marked for deprecation, this should work, right?

Is there a way to programmatically check if the containers are “linked”?

You can try the solution under path /var/answers within the lab.