Skip to content

Conversation

bennettgoble
Copy link
Member

@bennettgoble bennettgoble commented Mar 31, 2022

Allow static assets to be hosted directly by nginx using volume mounts and a list of desired bind locations defined using a STATIC_LOCATIONS environment variable.

Docker compose example:

services:
  app:
    # ...
    volumes:
      static:/var/www/static
  proxy:
    # ...
    environment:
      STATIC_LOCATIONS:/static/:/var/www/static/
    volumes:
      static:/var/www/static
volumes:
  static:

When deployed in ECS, the volumesFrom directive can be used.

Notes

  • Switched from mo to gomplate for better enumeration and string manipulation
  • Updated actions to newest standards

@bennettgoble bennettgoble force-pushed the signal/static branch 4 times, most recently from 8d359dc to ad718e0 Compare March 31, 2022 15:31
@bennettgoble bennettgoble requested a review from a team as a code owner March 31, 2022 15:56
@jjlinden
Copy link

v cool

&& sha_envvar="GOMPLATE_${ARCH^^}_SHA256" \
&& GOMPLATE_SHA256="${!sha_envvar}" \
&& echo "${GOMPLATE_SHA256} /tmp/gomplate" | sha256sum -c \
&& chmod +x /tmp/gomplate
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm installing gomplate as a layer, but we could alternatively provide an OCI image for multiple platforms that applications could source from.

@bennettgoble bennettgoble added the enhancement New feature or request label Mar 31, 2022
@bennettgoble bennettgoble merged commit 68d7fbb into main Mar 31, 2022
@bennettgoble bennettgoble deleted the signal/static branch March 31, 2022 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants