FROM alpine:latest

RUN apk update && apk upgrade
RUN apk add bash nginx nodejs npm git

COPY src/nginx.conf /etc/nginx/http.d/default.conf

RUN mkdir /app
WORKDIR /app

RUN git clone https://git.lycaknight.de/lycaknight/portfolio.git /app
RUN npm install && npm run build

CMD ["/bin/bash", "-c", "nginx -g 'daemon off;'"]
EXPOSE 80
