|
|
@@ -24,7 +24,7 @@ services:
|
|
|
web:
|
|
|
build: .
|
|
|
ports:
|
|
|
- - "5000:5000"
|
|
|
+ - "8000:8000"
|
|
|
volumes:
|
|
|
- .:/code
|
|
|
depends_on:
|
|
|
@@ -55,12 +55,12 @@ Listing containers must show one container running and the port mapping as below
|
|
|
$ docker compose ps
|
|
|
NAME COMMAND SERVICE STATUS PORTS
|
|
|
flask-redis-redis-1 "redis-server --load…" redis running 0.0.0.0:6379->6379/tcp
|
|
|
-flask-redis-web-1 "/bin/sh -c 'python …" web running 0.0.0.0:5000->5000/tcp
|
|
|
+flask-redis-web-1 "/bin/sh -c 'python …" web running 0.0.0.0:8000->8000/tcp
|
|
|
```
|
|
|
|
|
|
-After the application starts, navigate to `http://localhost:5000` in your web browser or run:
|
|
|
+After the application starts, navigate to `http://localhost:8000` in your web browser or run:
|
|
|
```
|
|
|
-$ curl localhost:5000
|
|
|
+$ curl localhost:8000
|
|
|
This webpage has been viewed 2 time(s)
|
|
|
```
|
|
|
|
|
|
@@ -80,3 +80,14 @@ Stop and remove the containers
|
|
|
```
|
|
|
$ docker compose down
|
|
|
```
|
|
|
+
|
|
|
+## Use with Docker Development Environments
|
|
|
+
|
|
|
+You can use this sample with the Dev Environments feature of Docker Desktop.
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+To develop directly on the services inside containers, use the HTTPS Git url of the sample:
|
|
|
+```
|
|
|
+https://github.com/docker/awesome-compose/tree/master/flask-redis
|
|
|
+```
|