educative.io

Educative

Trouble understanding links

Why it is mentioned
links:
- “database:exercisedb”
database is understood but from where this exercisedb is coming ??


Type your question above this line.

Course: https://www.educative.io/collection/4581872065576960/4866501796429824
Lesson: https://www.educative.io/collection/page/4581872065576960/4866501796429824/6607728782868480

Hello @Rajat_Bothra,

Basically, exercisedb is a database name used to create a database in app.py.

In docker-compose.yml file.

link:
      - “database:exercisedb”

This means that link the database container with the app container, and in both the container, the name of the database should be execisedb for connection of both the containers to the same database.

I hope I have answered your query; please let me know if you still have any confusion.

Thank You :blush: