Every FeaturePeek project has a
peek.yml file at its repo root. You'll add certain keys and values to this file depending on your front-end architecture.
If your project is a statically-built front-end, your
peek.yml file needs only one key: the path of your statically built assets. Frameworks like Jekyll, Hugo, and Create React App all output static content — you'll want to configure your project to be static if you're using one of those frameworks.
peek.yml file should look like this:
The path should be relative to the yaml file itself (your project root).
If your front-end builds inside a Docker container (for example, a Node.js app that serves dynamic routes), you'll need to specify the
services key. This object contains three keys:
name: An optional string to identify your project.
dockerfile: The path to your project's Dockerfile.
port: The port that your Dockerfile exposes.
peek.yml file should look something like this:
services: - name: my frontend dockerfile: ./Dockerfile port: 3000
Unlike statically-built projects, Dockerized projects have access to run-time environment variables.
Note: Sometimes, projects build inside Docker even though the built app only serves static assets — for example, apps that spin up an Express server only to serve files out of a static directory.
If your project does not depend on dynamic routes, you should instead configure your project to be static. Your environment start-up times will be faster.