Improve Docker run (envsubst, Alpine, documented env file) (#870)
* Add template for secret.json
- Move to faster and lighter Alpine base image
* Update documentation
* Update documentation
* Fix Github token config for secret.json
* Extend env file for Docker runtime configuration
- Update documentation
- Add gh_token for GH personal access token to secret template
* Change http to https in infoSite
* Update .dockerignore
* Update .gitignore
* Update dockerignore
* Remove ENV directive from Dockerfile
- Environment is needed at runtime, not at buildtime
* Docker: contain secret.json in private/
- Incorporates fix from 7c8b0e3d
* Use localhost in example env
* Use baseUrl in GitHub redirect
* Move GH personal token retrieval up
- To remove duplicate Promise.then()
* Typo in shields.example.env
This commit is contained in:
committed by
Daniel Lo Nigro
parent
f97d5a6bd4
commit
15f24fbcce
18
Dockerfile
18
Dockerfile
@@ -1,3 +1,17 @@
|
||||
FROM node:6.4.0-onbuild
|
||||
ENV INFOSITE http://shields.io
|
||||
FROM node:6.9.2-alpine
|
||||
|
||||
RUN apk add --update gettext
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
RUN mkdir /usr/src/app/private
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
ARG NODE_ENV
|
||||
ENV NODE_ENV $NODE_ENV
|
||||
COPY package.json /usr/src/app/
|
||||
RUN npm install
|
||||
COPY . /usr/src/app
|
||||
|
||||
CMD envsubst < secret.tpl.json > ./private/secret.json && npm start
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user