
services:
 rainbowpages_db:
  container_name: rainbowpages_db
  image: anssi/fcsc2020-web-rainbow-pages-1-db:latest
  environment:
   POSTGRES_USER: postgres
   POSTGRES_PASSWORD: ev1aedig0seiGau1bae3ooSeiqu3aow2
   POSTGRES_DATABASE: fcsc2020
  expose:
   - 5432
  networks:
   - rainbowpages_network

 rainbowpages_graphql:
  container_name: rainbowpages_graphql
  image: graphile/postgraphile:4.13.0
  depends_on:
   - rainbowpages_db
  expose:
   - 5000
  entrypoint: []
  command: |
    sh -c "yarn add postgraphile postgraphile-plugin-connection-filter && \
    ./cli.js --connection postgres://postgres:ev1aedig0seiGau1bae3ooSeiqu3aow2@rainbowpages_db:5432/fcsc2020 --host 0.0.0.0 --port 5000 --schema rainbowpages1 --export-schema-graphql /root/schema.graphql --retry-on-init-fail --disable-default-mutations --graphiql false --append-plugins postgraphile-plugin-connection-filter"
  networks:
   - rainbowpages_network

 rainbowpages_web:
  container_name: rainbowpages_web
  image: anssi/fcsc2020-web-rainbow-pages-1-web:latest
  depends_on:
   - rainbowpages_graphql
  environment:
   GRAPHQL_URL: "http://rainbowpages_graphql:5000/graphql"
  expose:
   - 80
  ports:
   - 8000:80
  networks:
   - rainbowpages_network

networks:
  rainbowpages_network:
