Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

With or without docker #947

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
added env and replace vars
  • Loading branch information
Darren Nelsen committed May 3, 2018
commit 40fe54298d6993ab2c0189c23d81a7f9785b76f1
11 changes: 11 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -2,7 +2,18 @@ FROM node
MAINTAINER SonicWizard
COPY . /var/www
WORKDIR /var/www

ENV API_PREFIX=/api
ENV IONIC_PATH=${API_PREFIX}
ENV IONIC_PROXY_URL=https://bch-insight.bitpay.com/api

RUN npm install
RUN npm rebuild node-sass

RUN npm install -g replace
RUN replace 'API_PREFIX' ${API_PREFIX} ./src/providers/api/api.ts
RUN replace 'IONIC_PATH' ${IONIC_PATH} ./ionic.config.json
RUN replace 'IONIC_PROXY_URL' ${IONIC_PROXY_URL} ./ionic.config.json

EXPOSE 8100
ENTRYPOINT ["npm", "start"]
4 changes: 2 additions & 2 deletions app/ionic.config.json
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@
},
"proxies": [
{
"path": "/api",
"proxyUrl": "https://bch-insight.bitpay.com/api"
"path": "IONIC_PATH",
"proxyUrl": "IONIC_PROXY_URL"
}
]
}
Loading