Merge pull request 'Basic Cleanup in docker-compose files for convenience and Readme fixing' (#9) from dev-pm-cleanup into develop
This commit is contained in:
commit
cce047a060
22
README.md
22
README.md
|
@ -4,14 +4,24 @@
|
|||
|
||||
### Check-out repository
|
||||
* [Install git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
|
||||
* `git clone https://github.com/netzbegruenung/candymat.git`
|
||||
* `git clone https://git.verdigado.com/Netzbegruenung/candymat.git`
|
||||
* To get the (external) user-app source:
|
||||
```
|
||||
git submodule init
|
||||
git submodule update
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
### Start backend
|
||||
### Start the services
|
||||
|
||||
* ```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
|
||||
```docker-compose up -d``` for dev setup.
|
||||
The database will use a volume to persist changes in-between runs.
|
||||
To start with a clean database, either delete the volume from the postgres configuration in the compose file
|
||||
or run ```docker volume rm candymat_db-data``` before starting the containers.
|
||||
|
||||
|
||||
### Where to access the services
|
||||
|
||||
* GraphQL IDE/GUI: http://localhost:5433/graphiql
|
||||
* GraphQL Endpoint: http://localhost:5433/graphql
|
||||
* UserApp: http://localhost:8080
|
||||
* RedaktionsApp: http://localhost:8081
|
||||
* Postgres database: http://localhost:5432
|
||||
|
|
|
@ -2,20 +2,26 @@ version: '3.1'
|
|||
|
||||
services:
|
||||
redaktion:
|
||||
container_name: redaktion
|
||||
build:
|
||||
context: ./redaktions-app/
|
||||
dockerfile: ./dev.Dockerfile
|
||||
depends_on:
|
||||
- graphql
|
||||
ports:
|
||||
- '3001:3000'
|
||||
- '8081:3000'
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
user-app:
|
||||
container_name: user-app
|
||||
build:
|
||||
context: ./candymat-user-app/
|
||||
dockerfile: ./dev.Dockerfile
|
||||
depends_on:
|
||||
- graphql
|
||||
ports:
|
||||
- "8080:8080"
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
postgres:
|
||||
image: candymat-postgres:11.5
|
||||
|
@ -26,6 +32,8 @@ services:
|
|||
ports:
|
||||
- "5432:5432"
|
||||
restart: always
|
||||
volumes:
|
||||
- "db-data:/var/lib/postgresql/data"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
|
@ -34,9 +42,8 @@ services:
|
|||
image: graphile/postgraphile
|
||||
depends_on:
|
||||
- postgres
|
||||
env_file: ./backend/.env-backend
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- "5433:5000"
|
||||
command: ["--connection", $DATABASE_URL, "--host", "0.0.0.0", "--port", "5000", "--schema", "candymat_data", "--watch"]
|
||||
networks:
|
||||
- frontend
|
||||
|
@ -44,4 +51,7 @@ services:
|
|||
|
||||
networks:
|
||||
backend:
|
||||
frontend:
|
||||
frontend:
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
version: '3.1'
|
||||
|
||||
services:
|
||||
redaktion:
|
||||
container_name: redaktions-app
|
||||
build:
|
||||
context: ./redaktions-app/
|
||||
dockerfile: ./prod.Dockerfile
|
||||
ports:
|
||||
- '80:80'
|
||||
|
||||
postgres:
|
||||
image: candymat-postgres:11.5
|
||||
build:
|
||||
dockerfile: ./Dockerfile
|
||||
context: ./backend/
|
||||
env_file: ./backend/.env-backend
|
||||
volumes:
|
||||
- "db-data:/var/lib/postgresql/data"
|
||||
ports:
|
||||
- "5432:5432"
|
||||
restart: always
|
||||
networks:
|
||||
- backend
|
||||
|
||||
graphql:
|
||||
restart: always
|
||||
image: graphile/postgraphile
|
||||
depends_on:
|
||||
- postgres
|
||||
env_file: ./backend/.env-backend
|
||||
ports:
|
||||
- "5000:5000"
|
||||
command: ["--connection", $DATABASE_URL, "--host", "0.0.0.0", "--port", "5000", "--schema", "candymat_data", "--watch"]
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
networks:
|
||||
backend:
|
||||
frontend:
|
||||
volumes:
|
||||
db-data:
|
|
@ -35,5 +35,5 @@
|
|||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"proxy": "http://localhost:5000"
|
||||
"proxy": "http://graphql:5000"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue