topfunky / frontend

A GraphQL frontend to the demo app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HashiCups Frontend

React UI that interacts with GraphQL public-api.

CircleCI

Docker Image: https://hub.docker.com/repository/docker/hashicorpdemoapp/frontend

Docker Image: https://hub.docker.com/repository/docker/hashicorpdemoapp/frontend-nginx

Running

The frontend proxies requests to the graphQL backend at the path /api. When running locally ensure your public-api is running at http://localhost:8080 or change package.json before running yarn start.

To run the application using the Docker container you need to add nginx configuration like the following example and mount it at /etc/nginx/conf.d/default.conf. Set the backend proxy_add for the api to the location of your server.

For the frontend only image:

docker run -it -p 3000:3000 hashicorpdemoapp/frontend:v1.0.9

For the frontend (with nginx) image:

docker run -it -p 80:80 -v $PWD/nginx.conf:/etc/nginx/conf.d/default.conf --env NEXT_PUBLIC_FOOTER_FLAG=test123 hashicorpdemoapp/frontend-nginx:v1.0.9

Creating a new release

The build pipeline is setup with Circle CI to build and create a new Docker image whenever a new tag is pushed to this repo. To create a new release execute the following commands:

# Use sem var for tags, i.e. v0.0.1
git tag [tag]
git push origin [tag]

About

A GraphQL frontend to the demo app


Languages

Language:JavaScript 95.1%Language:Dockerfile 2.2%Language:CSS 1.3%Language:Shell 1.3%Language:Makefile 0.1%