diff --git a/Dockerfile.autobuild b/Dockerfile.autobuild index 4388124..6439e5b 100644 --- a/Dockerfile.autobuild +++ b/Dockerfile.autobuild @@ -12,7 +12,7 @@ # Base system is the LTS version of Ubuntu. -FROM python:3.6-stretch +FROM python:3.7-stretch RUN groupadd -g 2300 tmpgroup \ && usermod -g tmpgroup www-data \ @@ -41,6 +41,14 @@ RUN cd /srv/www/pinry \ COPY . /srv/www/pinry/ +# config nodejs and build frontend +RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n +RUN bash n 10 +RUN npm -g install yarn + +# build frontend +RUN cd /srv/www/pinry/pinry-spa/ && yarn install && yarn build + # Fix permissions RUN chown -R www-data:www-data /srv/www \ && cd /srv/www/pinry \ diff --git a/docker/nginx/sites-enabled/default b/docker/nginx/sites-enabled/default index 75f3ebe..a098d16 100644 --- a/docker/nginx/sites-enabled/default +++ b/docker/nginx/sites-enabled/default @@ -26,7 +26,7 @@ server { } location / { - root /app/pinry-spa/dist/; + root /srv/www/pinry/pinry-spa/dist/; access_log off; } }