Skip to content

Commit

Permalink
Compile SASS library before frontend installation
Browse files Browse the repository at this point in the history
  • Loading branch information
jgontrum committed Nov 10, 2018
1 parent 44b3b5f commit a33fd3c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ RUN apt-get update && apt-get install -y \
libssl-dev \
supervisor \
curl \
nginx \
vim-tiny &&\
nginx && \
apt-get -q clean -y && rm -rf /var/lib/apt/lists/* && rm -f /var/cache/apt/*.bin

# Install node for the frontend
Expand All @@ -20,7 +19,13 @@ RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \

# Copy and set up the app
COPY . /app
RUN cd /app && make clean && make && cd /app/frontend && make clean && make

# Build SASSC
RUN bash /app/build_sassc.sh

# Build app
RUN cd /app/frontend && make clean && make
RUN cd /app && make clean && make

# Configure nginx & supervisor
RUN mv /app/config/nginx.conf /etc/nginx/sites-available/default &&\
Expand Down
11 changes: 11 additions & 0 deletions build_sassc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

mkdir -p /tmp/sass
cd /tmp/sass
git clone https://github.com/sass/sassc.git
. sassc/script/bootstrap
make -C sassc -j4
PREFIX="/usr" make -C sassc install
cd
rm -rf /tmp/sass

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
},
"homepage": "https://github.com/explosion/displacy#readme",
"devDependencies": {
"harp": "^0.20.3"
"harp": "^0.29.0"
}
}

0 comments on commit a33fd3c

Please sign in to comment.