Merge pull request #23 from netzbegruenung/setup-graphql-service
Setup graphql service
This commit is contained in:
commit
ea4cbfee3f
5
.env
5
.env
|
@ -1,2 +1,5 @@
|
|||
COMPOSE_FILE=docker-compose.dev.yml
|
||||
COMPOSE_PROJECT_NAME=candymat
|
||||
COMPOSE_PROJECT_NAME=candymat
|
||||
|
||||
#Postgraphile vars
|
||||
DATABASE_URL=postgres://candymat:postgres!dev@postgres:5432/candymat_db
|
||||
|
|
|
@ -10,4 +10,8 @@
|
|||
git submodule init
|
||||
git submodule update
|
||||
```
|
||||
|
||||
|
||||
### Start backend
|
||||
|
||||
* ```docker-compose up -d```
|
||||
* Point browser to http://localhost:5000/graphiql for testing queries and documentation of nodes and http://localhost:5000/graphql for graphQL endpoint
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
POSTGRES_PASSWORD=postgres!dev
|
||||
POSTGRES_USER=candymat
|
||||
POSTGRES_DB=candymat_db
|
||||
POSTGRES_SCHEMA=candymat_data
|
||||
POSTGRES_SCHEMA=candymat_data
|
||||
|
|
|
@ -13,5 +13,19 @@ services:
|
|||
networks:
|
||||
- backend
|
||||
|
||||
graphql:
|
||||
restart: always
|
||||
image: graphile/postgraphile
|
||||
depends_on:
|
||||
- postgres
|
||||
env_file: ./backend/.env-backend
|
||||
ports:
|
||||
- "5000:5000"
|
||||
command: ["postgraphile", "--connection", $DATABASE_URL, "--host", "0.0.0.0", "--port", "5000", "--schema", "candymat_data", "--watch"]
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
networks:
|
||||
backend:
|
||||
backend:
|
||||
frontend:
|
|
@ -15,7 +15,21 @@ services:
|
|||
networks:
|
||||
- backend
|
||||
|
||||
graphql:
|
||||
restart: always
|
||||
image: graphile/postgraphile
|
||||
depends_on:
|
||||
- postgres
|
||||
env_file: ./backend/.env-backend
|
||||
ports:
|
||||
- "5000:5000"
|
||||
command: ["postgraphile", "--connection", $DATABASE_URL, "--host", "0.0.0.0", "--port", "5000", "--schema", "candymat_data", "--watch"]
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
networks:
|
||||
backend:
|
||||
columes:
|
||||
frontend:
|
||||
volumes:
|
||||
db-data:
|
Loading…
Reference in a new issue