Skip to content

Symlink static for nginx or apache

Pedro Assuncao edited this page Dec 12, 2019 · 2 revisions

If you want serve your static css, js and images via your nginx or apache proxy you can add the following to .deliver/config

post_erlang_update() {
  symlink_static
}

post_upgrade_release() {
  symlink_static
}

symlink_static(){
  status "running post update!"
  __remote "
    ln -sfn $DELIVER_TO$APP/lib/$APP$RELEASE-$VERSION/priv/static $DELIVER_TO/$APP/static
  "
}

You can now update your nginx or apache config to allow serving static assets from the /path/to/symlink/of/static directory.