diff --git a/README.md b/README.md index 9e780c78a252c7cfcfc288de0f4c708f91208efc..01988fd9333239b96e708e4fd626d48b108591d2 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,12 @@ Clone this repository and then you can: - Stop and/or remove all data: `make destroy` It runs: + - PostgreSQL on port `5432` - Elasticsearch on port `9200` - Open Lobby Server on port `8010` - GraphQL API endpoint and GraphiQL interface are at `http://localhost:8010/graphql` - Open Lobby App on port `8020` - web application is at `http://localhost:8020` You may notice some errors and crashes if you access it immediately because -Elasticsearch starts slowly. But it should recover and eventually it will be all -running fine. +PostgreSQL and Elasticsearch starts slowly. But it should recover and eventually +it will be all running fine. diff --git a/docker-compose.yml b/docker-compose.yml index ee1ec33ce4ec9d596bb9973360fb0edb9c11269d..f2ad4f90f1bfa30f7beb7de2ee8faa645d9c98d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,18 @@ version: "2" services: + openlobby-postgres: + image: postgres:9.5 + environment: + - POSTGRES_USER=db + - POSTGRES_PASSWORD=db + - POSTGRES_DB=openlobby + ports: + - "5432:5432" + restart: always + volumes: + - postgres-data:/var/lib/postgresql/data + openlobby-es: image: openlobby/openlobby-es-czech:latest environment: @@ -25,8 +37,10 @@ services: - "8010:8010" restart: always depends_on: + - openlobby-postgres - openlobby-es environment: + - DATABASE_DSN=postgresql://db:db@openlobby-postgres:5432/openlobby - ELASTICSEARCH_DSN=http://openlobby-es:9200 - SECRET_KEY=unsecure-demo-secret-key @@ -42,5 +56,7 @@ services: - SECRET_KEY=another-demo-secret-key volumes: + postgres-data: + driver: local es-data: driver: local