FROM nginx:stable-alpine

ARG LKRP_UL_URL="https:\/\/lkrp-dev.micord.ru\/ul\/"
ARG LKRP_UL_LANDING="https:\/\/lkrp-dev.micord.ru\/ul\/home.html"
ARG LKRP_FL_URL="https:\/\/lkrp-dev.micord.ru\/fl\/"
ARG LKRP_FL_LANDING="https:\/\/lkrp-dev.micord.ru\/fl\/home.html"

#COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY  ./html/ /usr/share/nginx/html/

RUN cd /usr/share/nginx/html \
 && sed -i -r "s/LKRP_UL_URL/$LKRP_UL_URL/g" ./index.html \
 && sed -i -r "s/LKRP_UL_LANDING/$LKRP_UL_LANDING/g" ./index.html \
 && sed -i -r "s/LKRP_FL_URL/$LKRP_FL_URL/g" ./index.html \
 && sed -i -r "s/LKRP_FL_LANDING/$LKRP_FL_LANDING/g" ./index.html

