-
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.
- Loading branch information
Tsvetan Ivanov
committed
May 9, 2020
1 parent
fb4deaf
commit f19c61a
Showing
3 changed files
with
54 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Practice - Docker Compose | ||
|
||
## Fix _docker-compose.yml_ and ensure the Voting app is working properly | ||
- Review the Voting app [diagram](./voting-app.png) | ||
- Fix [docker-compose.yml](./docker-compose.yml) | ||
- Execute command: docker-compose up | ||
- Ensure the Voting app is working properly |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version: "2" | ||
|
||
services: | ||
vote: | ||
image: dockersamples/examplevotingapp_vote:latest | ||
networks: | ||
- front-end-subnet | ||
ports: | ||
- "80:80" | ||
|
||
# Hint: On which port the container is listening? | ||
result: | ||
image: dockersamples/examplevotingapp_result:latest | ||
networks: | ||
- back-end-subnet | ||
ports: | ||
- "8080:8080" | ||
|
||
# Hint: What network is going to be attached to the worker service? | ||
worker: | ||
image: dockersamples/examplevotingapp_worker:latest | ||
depends_on: | ||
- "redis" | ||
- "db" | ||
|
||
# Hint: Should we care about the service name? | ||
redis-mredis: | ||
image: redis:3.2 | ||
networks: | ||
- front-end-subnet | ||
|
||
# Hint: environment variable should be set to allow connections without setting database password | ||
db: | ||
image: postgres:9.4 | ||
networks: | ||
- back-end-subnet | ||
volumes: | ||
- db-data:/var/lib/postgresql/data | ||
|
||
# Hint: Do we need volumes section? | ||
|
||
# Hint: Do we need special network drivers to run the app? | ||
networks: | ||
front-end-subnet: | ||
driver: custom | ||
back-end-subnet: | ||
driver: bridge |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.