From 090afe2367458434fd7c6483ccd0700b510136ac Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Tue, 5 Mar 2019 14:23:07 +0100 Subject: [PATCH] Fix docker deploy --- Dockerfile | 53 ++++++++++------------------------------------------- 1 file changed, 10 insertions(+), 43 deletions(-) diff --git a/Dockerfile b/Dockerfile index 06d122b5..7a128d5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,50 +1,17 @@ -FROM python:latest +FROM node:10.15.1 -# -# setup -# -RUN apt-get update -RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - -RUN apt-get install -y chromium libappindicator3-1 xdg-utils fonts-liberation nodejs wget dpkg git python python3 python3-pip xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 -RUN npm install -g yarn +ARG BUILD_TYPE=stable -RUN ln -s /usr/bin/chromium /usr/local/bin/chromium-browser +WORKDIR /trezor-wallet-app -# -# build emulator -# -RUN mkdir /trezor-emulator -WORKDIR /trezor-emulator +COPY package.json /trezor-wallet-app +COPY yarn.lock /trezor-wallet-app -RUN git clone https://github.com/trezor/trezor-core -WORKDIR /trezor-emulator/trezor-core -RUN git submodule update --init --recursive +RUN yarn install -RUN apt-get install libusb-1.0-0 -RUN pip3 install scons trezor -RUN make build_unix_noui +COPY . /trezor-wallet-app -# -# install bridge -# -RUN mkdir /trezor-bridge -WORKDIR /trezor-bridge -RUN wget https://wallet.trezor.io/data/bridge/2.0.25/trezor-bridge_2.0.25_amd64.deb -RUN dpkg -x /trezor-bridge/trezor-bridge_2.0.25_amd64.deb /trezor-bridge/extracted +RUN yarn run build:${BUILD_TYPE} -# -# install trezor-wallet -# -RUN mkdir /trezor-wallet -WORKDIR /trezor-wallet -COPY package.json /trezor-wallet -COPY yarn.lock /trezor-wallet -RUN yarn -COPY . /trezor-wallet -RUN yarn run build:stable - -# -# run -# -ENTRYPOINT ["/trezor-wallet/test/scripts/run-all.sh"] -EXPOSE 8080 21325 \ No newline at end of file +EXPOSE 8080 +CMD [ "yarn", "run", "prod-server" ] \ No newline at end of file