Skip to content

Commit

Permalink
Add some notes about extra_hosts directive within README_DEV.md (#…
Browse files Browse the repository at this point in the history
…111)

* Update README_DEV.md

add some notes about `extra_hosts` directive

* add image
  • Loading branch information
Raruto authored Feb 22, 2024
1 parent ea5588c commit 4da108c
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion README_DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,33 @@ Follow instructions are for development environment.
* set `G3WSUITE_LOCAL_CODE_PATH` with path to your local G3W-SUITE code location.

2. Run `docker compose -f docker-compose-dev.yml up -d`.
1. If all went well G3W-SUITE is running in development mode on http://127.0.0.1:8000
1. If all went well G3W-SUITE is running in development mode on http://127.0.0.1:8000


## Additional notes

If you are working in a mixed setup (ie. a local [postgis](https://postgis.net/) instance + a [g3w-suite-docker](https://github.com/g3w-suite/g3w-suite-docker) container), you should add an `extra_hosts` directive within your `docker-compose-dev.yml` to make your local postgres databases accessible from both sides:

![Connecting to a local postgress DB](https://github.com/g3w-suite/g3w-admin/assets/9614886/ade856d2-99ec-4024-ab0d-7c631cfa67e8)

```yaml

g3w-suite:
image: g3wsuite/g3w-suite:dev

...

extra_hosts:
- "postgis16:host-gateway"
```
taking care to edit your `hosts` file accordingly:

```sh
# Added for G3W-SUITE docker
127.0.0.1 postgis16
```

**For more info:**

- https://docs.docker.com/compose/compose-file/compose-file-v3/#extra_hosts

0 comments on commit 4da108c

Please sign in to comment.