- https://github.com/railwayapp-templates/nginx をもとにして作成
htpasswd -c .htpasswd user
実行して認証用ファイル生成する- Dockerfile をこんな感じに更新して
FROM nginx:alpine
COPY .htpasswd /etc/nginx/.htpasswd
COPY nginx.conf /etc/nginx/nginx.conf
COPY site /usr/share/nginx/html
- nginx.confはこんな感じに更新