Skip to content

Commit

Permalink
Add how to create databases from docker in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
joserc87 committed Jan 30, 2021
1 parent 6e16250 commit 19ce0b4
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,27 @@ FLASK_APP=runserver.py flask run

Assets for image generation go in `sdv\assets\[subfolder]`. Assets used as-is go in `sdv\static\assets\[subfolder]`.

## With Docker compose
## Run With Docker compose

### Create the DB

Build all the containers but start only the postgres one for now. Then, run the
`createadmin.py` from the webapps container:

```bash
docker compose build
docker compose up postges
docker run \
-it \
-e PYTHONPATH=. \
-v "$(pwd)"/:/app \
--network=sdv-summary_postgres \
sdv-summary_webapp \
bas -c "python sdv/createadmin.py; python sdv/createdb.py"
docker-compose down
```

### Run the webapp + database

```bash
docker compose up
Expand Down

0 comments on commit 19ce0b4

Please sign in to comment.