Added dockerfile and updated target api version to 1.1.7.
This commit is contained in:
parent
b2d981b0c7
commit
fe848488f0
1 changed files with 20 additions and 0 deletions
20
dockerfile
Normal file
20
dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
FROM node:10.14.2-alpine
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
ENV XBROWSERSYNC_API_VERSION 1.1.7
|
||||||
|
|
||||||
|
WORKDIR /usr/src/api
|
||||||
|
|
||||||
|
# Download release and unpack
|
||||||
|
RUN wget -q -O release.tar.gz https://github.com/xBrowserSync/api/archive/v$XBROWSERSYNC_API_VERSION.tar.gz \
|
||||||
|
&& tar -C . -xzf release.tar.gz \
|
||||||
|
&& rm release.tar.gz \
|
||||||
|
&& mv api-$XBROWSERSYNC_API_VERSION/* . \
|
||||||
|
&& rm -rf api-$XBROWSERSYNC_API_VERSION/
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install --only=production
|
||||||
|
|
||||||
|
# Expose port and start api
|
||||||
|
EXPOSE 8080
|
||||||
|
CMD [ "node", "dist/api.js"]
|
Loading…
Reference in a new issue