Skip to content

Instantly share code, notes, and snippets.

@konsumer
Last active January 8, 2022 16:35
Show Gist options
  • Save konsumer/672d98e7cf07c12dfa2d57b0071dbbf1 to your computer and use it in GitHub Desktop.
Save konsumer/672d98e7cf07c12dfa2d57b0071dbbf1 to your computer and use it in GitHub Desktop.
Setup a quick postres-based GraphQL server, that structures graphs on postgres structure.
# Setup a quick postres-based GraphQL server, that structures graphs on postgres structure.
# run docker-compose up
# postgres admin at http://localhost:8080 (postgres/postgres)
# graphql at http://localhost:5000/graphiql
# change your tables in admin, and the structure will be reflected in graphql
version: '3.1'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: postgres
adminer:
image: adminer
restart: always
ports:
- 8080:8080
postgraphile:
image: postgraphql/postgraphql
restart: always
ports:
- 5000:5000
command: postgraphile --watch --connection postgres://postgres:postgres@db:5432/postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment