Skip to content

Commit a415927

Browse files
committed
Doc tweaks
1 parent 7d1d7a6 commit a415927

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

README.md

+33-3
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,44 @@ brew install mysql
1919

2020
## Using docker-compose
2121

22+
### All-in-One vuln_django
23+
24+
The default Docker Compose configuration builds an all-in-one container, including vuln_django, an Nginx front-end, and SQLite.
25+
2226
Build and run in foreground:
23-
`docker-compose up --build`
27+
```shell script
28+
docker-compose up --build
29+
```
2430

2531
Run as a daemon:
26-
`docker-compose up -d`
32+
```shell script
33+
docker-compose up -d
34+
```
2735

2836
Build:
29-
`docker-compose build`
37+
```shell script
38+
docker-compose build
39+
```
40+
41+
### Microservice vuln_django
42+
The `docker-micro-pg` Docker Compose configuration builds a microservice version of vuln_django, with separate containers running an Nginx front-end, and PostgreSQL database.
43+
44+
Build, run, and run data migrations:
45+
```shell script
46+
docker-compose -f docker-micro-pg.yml build
47+
docker-compose -f docker-micro-pg.yml up --detach
48+
./scripts/migrations.sh
49+
```
50+
51+
To bring the microservice stack up with migrations, a Django admin user, and seed data, run:
52+
```shell script
53+
./scripts/build-and-run.sh
54+
```
55+
56+
To do that plus run HawkScan against it, run:
57+
```shell script
58+
./scripts/build-and-scan.sh
59+
```
3060

3161
## Using Dockerfile
3262

File renamed without changes.

scripts/build-and-scan.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -ex
44
source $(dirname $0)/common.sh
55

66
# Build vuln-django and run it with Nginx and PostgreSQL
7-
$(dirname $0)/build-and-prep.sh
7+
$(dirname $0)/build-and-run.sh
88

99
# Run HawkScan against the app
1010
docker-compose -f docker-micro-pg.yml -f docker-hawkscan.yml up --abort-on-container-exit

scripts/migrations.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -ex
44

55
EXEC_CMD='docker-compose --file docker-micro-pg.yml exec vuln-django'
66

7-
echo Waiting for database to become available...
7+
echo Wait for database to become available...
88
while ! ${EXEC_CMD} bash -c 'nc -z "${SQL_HOST}" "${SQL_PORT}"'; do
99
sleep 0.5
1010
done

0 commit comments

Comments
 (0)