FROM nginx:1.21.6
COPY ./docker/web/nginx.conf  /etc/nginx/nginx.conf
COPY ./docker/web/default.conf /etc/nginx/conf.d/default.conf
COPY ./dinky-web/dist/ /usr/share/nginx/html/

# repalge nginx conf 'API_ORIGIN' and run
ENTRYPOINT sed  -i "s/API_ORIGIN/$API_ORIGIN/g" /etc/nginx/conf.d/default.conf && nginx -g "daemon off;"
