#!/bin/sh set -eu src=/srv/olapka-source dst=/srv/olapka-ram awk -v p="$dst" '$2==p && $3=="tmpfs" {found=1} END {exit !found}' /proc/mounts || { echo "Missing tmpfs: $dst" >&2; exit 1; } test -s "$src/index.html" || { echo "Missing source index.html" >&2; exit 1; } test -z "$(find "$src" -type l -print -quit)" || { echo "Use regular site files instead of symbolic links." >&2; exit 1; } cp -a "$src/." "$dst/" chmod 0755 "$dst" nginx -t exec /docker-entrypoint.sh "$@"