Skip to content

Instantly share code, notes, and snippets.

@gintsgints
Created July 18, 2019 17:08
Show Gist options
  • Save gintsgints/2fcdc40c7fe61b743b723779e467f59c to your computer and use it in GitHub Desktop.
Save gintsgints/2fcdc40c7fe61b743b723779e467f59c to your computer and use it in GitHub Desktop.

docker-compose.yml

version: '3'
services:
  server:
    image: postgrest/postgrest
    ports:
      - "3000:3000"
    links:
      - db:db
    environment:
      PGRST_DB_URI: postgres://postgres:postgres_234@db:5432/postgres
      PGRST_DB_SCHEMA: public
      PGRST_DB_ANON_ROLE: app_user #In production this role should not be the same as the one used for the connection
    depends_on:
      - db
  db:
    image: postgres
    ports:
      - "5432:5432"
    environment:
      POSTGRES_PASSWORD: postgres_234
  swagger:
    image: swaggerapi/swagger-ui
    ports:
      - "8080:8080"
    expose:
      - "8080"
    environment:
      API_URL: http://localhost:3000/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment