mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-27 10:48:22 +00:00
Export resources while docker build
This commit is contained in:
parent
d91a043967
commit
b1fe64867d
@ -1,5 +1,7 @@
|
|||||||
FROM node:8
|
FROM node:8
|
||||||
|
|
||||||
|
ARG BUILD_TYPE=prod
|
||||||
|
|
||||||
WORKDIR /trezor-wallet-app
|
WORKDIR /trezor-wallet-app
|
||||||
|
|
||||||
COPY package.json /trezor-wallet-app
|
COPY package.json /trezor-wallet-app
|
||||||
@ -9,7 +11,7 @@ RUN yarn install
|
|||||||
|
|
||||||
COPY . /trezor-wallet-app
|
COPY . /trezor-wallet-app
|
||||||
|
|
||||||
RUN yarn run build:prod
|
RUN yarn run build:${BUILD_TYPE}
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD [ "yarn", "run", "prod-server" ]
|
CMD [ "yarn", "run", "prod-server" ]
|
@ -1,4 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
docker build -t trezor-wallet ../
|
|
||||||
|
if [[ "$1" == "dev" || "$1" == 'beta' || "$1" == 'prod' ]]
|
||||||
|
then
|
||||||
|
docker stop trezor-wallet
|
||||||
|
docker rm trezor-wallet
|
||||||
|
docker build -t trezor-wallet ../ --build-arg BUILD_TYPE=$1
|
||||||
|
docker run -p 8080:8080 -d --name trezor-wallet trezor-wallet:latest
|
||||||
|
docker cp trezor-wallet:/trezor-wallet-app/build/$1 ../build/
|
||||||
|
docker stop trezor-wallet
|
||||||
|
docker rm trezor-wallet
|
||||||
|
else
|
||||||
|
echo "invalid parameters... valid parameters are (beta, dev, prod)"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user