qpa-client/Dockerfile

29 lines
660 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-10-04 17:21:47 +02:00
COPY ./dist/ssr ./opt/ssr
COPY ./package.json /opt/ssr
COPY ./yarn.lock /opt/ssr
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
2019-10-04 17:21:47 +02:00
COPY ./dist/static/. /var/www/qpa
2019-08-03 17:25:41 +02:00
2019-10-04 17:21:47 +02:00
WORKDIR /opt/ssr
2019-08-03 17:25:41 +02:00
2019-10-04 17:21:47 +02:00
ENTRYPOINT service nginx start; node ssr-server.js