Skip to content

Improve environment variables #183

@olafveerman

Description

@olafveerman

The frontend is a statically built site. For the current offline use case, we build a Docker image that serves the site with nginx. The configuration is known in advance, and available when we build the image. When somebody runs docker-compose, the site is already fully built, and not aware of environment variables that may be set.

With the deployment through CloudFormation, not all configuration is known in advance (eg. the address of the API). We need to build the Docker image in such a way that environment variables can be used to set config.

Approach

Don't build the site in the pre-baked Docker image, instead build it when the container starts so it can pick up the env vars. To do:

  • add node + yarn to Docker container
  • include node modules in Docker image, so this doesn't have to be done when container launches
  • build the site when docker starts

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions