Q:

How can I start one container before other?

I need to start backend-container after start database-container. How can I do it with docker-compose?

A:

Use a depends_on clause on your backend-container. Something like that :
version: "3.7"
services:
  web:
    build: .
    depends_on:
      - db
  db:
    image: postgres

Here is the documentation about it. 
Have fun!

