qpa-client/Dockerfile

30 lines
705 B
Docker
Raw Normal View History

2019-08-03 17:25:41 +02:00
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update
2019-08-06 10:05:35 +02:00
RUN apt-get install -y nodejs yarn nginx
2019-08-03 17:25:41 +02:00
# application
RUN mkdir /opt/client
2019-08-04 11:29:17 +02:00
COPY ./dist ./opt/client
COPY ./package.json /opt/client
COPY ./yarn.lock /opt/client
2019-08-03 17:25:41 +02:00
2019-08-06 10:05:35 +02:00
COPY ./client.nginx /etc/nginx/sites-available/default
RUN mkdir /var/www/qpa
COPY ./bin /var/www/qpa
2019-08-03 17:25:41 +02:00
2019-08-06 10:05:35 +02:00
RUN (cd /opt/client; yarn install --production)
2019-08-04 11:29:17 +02:00
WORKDIR /opt/client
2019-08-03 17:25:41 +02:00
2019-08-06 10:05:35 +02:00
ENTRYPOINT service nginx start; node SSR/index.js