-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,38 @@ | ||
# Specifies the Docker Compose version | ||
version: "3" | ||
|
||
# Defines the services that make up the application | ||
services: | ||
# Defines a service called "db" | ||
db: | ||
build: | ||
# Specifies how to build the Docker image for this service | ||
build: | ||
# Specifies the build context, which is the directory containing the Dockerfile | ||
context: db | ||
# Specifies the Dockerfile to use for building the image | ||
dockerfile: Dockerfile | ||
networks: | ||
# Attaches the service to the "book-scraper-network" network | ||
- book-scraper-network | ||
# Specifies the name to use for the container running this service | ||
container_name: db | ||
|
||
|
||
# Defines a service called "scraper" | ||
scraper: | ||
# Specifies how to build the Docker image for this service | ||
build: | ||
# Specifies the build context, which is the directory containing the Dockerfile | ||
context: app | ||
# Specifies the Dockerfile to use for building the image | ||
dockerfile: Dockerfile | ||
depends_on: | ||
# Specifies that this service depends on the "db" service | ||
- db | ||
networks: | ||
# Attaches the service to the "book-scraper-network" network | ||
- book-scraper-network | ||
|
||
# Defines a network that the services can use to communicate with each other | ||
networks: | ||
book-scraper-network: | ||
# Defines a network named "book-scraper-network" | ||
book-scraper-network: |