Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Commit

Permalink
use base image
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Lavigne committed Oct 3, 2018
1 parent 58bdbe7 commit 4cdc218
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
18 changes: 13 additions & 5 deletions onestep.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
# build
FROM nginx:stable-alpine
FROM nginx:stable

ARG CONTROLLER_SERVICE=http://lw-controller:8080
ENV CONTROLLER_SERVICE="${CONTROLLER_SERVICE}"

WORKDIR /app
COPY . .

RUN apk add --no-cache --virtual .build-deps nodejs alpine-sdk python \
RUN apt-get update \
&& apt-get install -y curl gnupg \
&& (curl -sL https://deb.nodesource.com/setup_8.x | bash -) \
&& apt-get update \
&& apt-get install -y python build-essential nodejs \
&& npm install \
&& npm run deploy:prod \
&& apk del .build-deps
&& rm -rf node_modules \
&& apt-get remove -y python build-essential nodejs curl gnupg

# RUN apk add --no-cache --virtual .build-deps nodejs alpine-sdk python \
# && npm install \
# && npm run deploy:prod \
# && apk del .build-deps

RUN cp /app/dist/docker-nginx.conf /etc/nginx/conf.d/default.conf
RUN mv /app/dist/ /var/www/

RUN rm /var/log/nginx/access.log /var/log/nginx/error.log

CMD ["nginx", "-g", "daemon off;"]
4 changes: 1 addition & 3 deletions src/static/docker-nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ server {
listen 80 default_server;
server_name localhost;

error_log /dev/stderr;
access_log /dev/stdout;

root /var/www;
index index.html index.htm;

Expand All @@ -17,6 +14,7 @@ server {
try_files $uri =404;
expires 1y;
add_header Cache-Control "public";
access_log off;
}

# Any route containing a file extension (e.g. /devicesfile.js)
Expand Down

0 comments on commit 4cdc218

Please sign in to comment.