FROM nginx:alpine
ARG API_UPSTREAM=http://api:3000
COPY site/ /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
RUN sed -i "s|http://api:3000|${API_UPSTREAM}|g" /etc/nginx/conf.d/default.conf
