You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gracefully stopping... (press Ctrl+C again to force)
193
-
Killing test_web_1 ... done
194
-
Killing test_db_1 ... done
195
-
```
196
-
197
-
It's safe to `rm -rf` your project directory.
192
+
> Note:
193
+
>
194
+
> On certain platforms (Windows 10), you might need to
195
+
edit `ALLOWED_HOSTS` inside `settings.py` and add your Docker host name
196
+
or IP address to the list. For demo purposes, you can set the value to:
197
+
>
198
+
> ALLOWED_HOSTS = ['*']
199
+
>
200
+
> Please note this value is **not** safe for production usage. Refer to the
201
+
[Django documentation](https://docs.djangoproject.com/en/1.11/ref/settings/#allowed-hosts) for more information.
202
+
{: .note-vanilla}
203
+
204
+
5. List running containers.
205
+
206
+
In another terminal window, list the running Docker processes with the `docker ps` command.
207
+
208
+
```none
209
+
$ docker ps
210
+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
211
+
def85eff5f51 django_web "python3 manage.py..." 10 minutes ago Up 9 minutes 0.0.0.0:8000->8000/tcp django_web_1
212
+
678ce61c79cc postgres "docker-entrypoint..." 20 minutes ago Up 9 minutes 5432/tcp django_db_1
213
+
214
+
```
215
+
216
+
6. Shut down services and clean up by using either of these methods:
217
+
218
+
* Stop the application by typing `Ctrl-C`
219
+
in the same shell in where you started it:
220
+
221
+
```none
222
+
Gracefully stopping... (press Ctrl+C again to force)
223
+
Killing test_web_1 ... done
224
+
Killing test_db_1 ... done
225
+
```
226
+
227
+
* Or, for a more elegant shutdown, switch to a different shell, and run [docker-compose down](/compose/reference/down/) from the top level of your Django sample project directory.
228
+
229
+
```none
230
+
vmb at mymachine in ~/sandbox/django
231
+
$ docker-compose down
232
+
Stopping django_web_1 ... done
233
+
Stopping django_db_1 ... done
234
+
Removing django_web_1 ... done
235
+
Removing django_web_run_1 ... done
236
+
Removing django_db_1 ... done
237
+
Removing network django_default
238
+
```
239
+
240
+
Once you've shut down the app, you can safely remove the Django project directory (for example, `rm -rf django`).
0 commit comments