version: '3.4'
services:
  express-api-es6-starter:
    build:
      context: .
      target: dev
    volumes:
      - .env.docker:/app/.env
    ports:
      - '8848:8848'
    depends_on:
      - pg
      - pg_test
    links:
      - pg
      - pg_test

  migration:
    build:
      context: .
      target: migrate
    volumes:
      - .env.docker:/app/.env
    depends_on:
      - pg
      - pg_test
    links:
      - pg
      - pg_test
  pg:
    image: postgres:11-alpine
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=mysecretpassword
      - POSTGRES_DB=express
  pg_test:
    image: postgres:11-alpine
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=mysecretpassword
      - POSTGRES_DB=express_test

version: '3.4'
services:
  express-api-es6-starter:
    build:
      context: .
      target: dev
    volumes:
      - .env.docker:/app/.env
    ports:
      - '8848:8848'
    depends_on:
      - pg
      - pg_test
    links:
      - pg
      - pg_test

  migration:
    build:
      context: .
      target: migrate
    volumes:
      - .env.docker:/app/.env
    depends_on:
      - pg
      - pg_test
    links:
      - pg
      - pg_test
  pg:
    image: postgres:13-alpine
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=mysecretpassword
      - POSTGRES_DB=express
  pg_test:
    image: postgres:13-alpine
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=mysecretpassword
      - POSTGRES_DB=express_test

Use postgres:13 as base image
Use postgres:13 as base image
