This repository was archived by the owner on Dec 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM node:6.9
2- EXPOSE 80
3- EXPOSE 25
42
53ENV PORT 80
4+ EXPOSE ${PORT}
5+
66ENV NODE_ENV development
77
88ENV TOWNSHIP_SECRET "some secret string here"
99ENV DATADIR /data
10- VOLUME /data
10+ VOLUME ${DATADIR}
1111
1212RUN mkdir -p /usr/src/app
1313WORKDIR /usr/src/app
1414COPY package.json /usr/src/app/
15- RUN npm install --production --loglevel warn
15+ RUN npm install --production --loglevel warn
1616COPY . /usr/src/app
17- RUN npm run build-js-prod && npm run build-css && npm run minify && npm run version
17+ RUN npm run build-js-prod \
18+ && npm run build-css \
19+ && npm run minify \
20+ && npm run version
21+
22+ # make it possible to use the image by default
23+ COPY config/default.js config/config.development.js
1824
1925# do docker exec: npm run database
2026
21- CMD npm run database && DEBUG=dat-registry npm run server
27+ CMD npm run database \
28+ && DEBUG=dat-registry npm run server
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ services:
44 build : .
55 image : datproject/datbase:${TAG}
66 ports :
7- - 25:25
8- expose :
9- - 80
7+ - 8888:80
108 environment :
119 - NODE_ENV=${NODE_ENV}
1210 volumes :
Original file line number Diff line number Diff line change 1+ version : ' 3.4'
2+ # start a swarm stack by running
3+ # docker stack up -c docker-swarm.yml dat
4+ #
5+ # Requires a docker swarm with traefik running on an externally connectable `infra_traefik` network
6+ # see https://github.com/onaci/swarm-infra
7+ services :
8+ datbase :
9+ build : .
10+ image : datproject/datbase:${TAG:-master}
11+ environment :
12+ - NODE_ENV=${NODE_ENV}
13+ - TOWNSHIP_SECRET
14+ - DATA=/data
15+ volumes :
16+ - data:/data
17+ configs :
18+ - source : datbase_config
19+ target : /usr/src/app/config/config.development.js
20+ networks :
21+ default :
22+ aliases :
23+ - datbase.${STACKDOMAIN:-loc.alho.st}
24+ infra_traefik :
25+ deploy :
26+ labels :
27+ - " traefik.docker.network=infra_traefik"
28+ # http://datbase.${STACKDOMAIN:-loc.alho.st}/
29+ - " traefik.datbase.port=80"
30+ - " traefik.datbase.frontend.rule=Host: datbase.${STACKDOMAIN:-loc.alho.st}"
31+
32+ networks :
33+ infra_traefik :
34+ external : true
35+
36+ volumes :
37+ data :
38+
39+ configs :
40+ datbase_config :
41+ file : ./config/default.js
Original file line number Diff line number Diff line change 5555 "devDependencies" : {
5656 "dat-node" : " ^3.5.0" ,
5757 "marked" : " ^0.3.6" ,
58- "nodemon" : " ^1.10.0" ,
5958 "request" : " ^2.79.0" ,
6059 "rimraf" : " ^2.5.4" ,
6160 "standard" : " ^7.1.2" ,
102101 "node-sass" : " ^3.8.0" ,
103102 "node-sass-magic-importer" : " ^0.1.4" ,
104103 "node-version-assets" : " ^1.1.0" ,
104+ "nodemon" : " ^1.10.0" ,
105105 "pretty-bytes" : " ^3.0.1" ,
106106 "pump" : " ^1.0.2" ,
107107 "range-parser" : " ^1.2.0" ,
You can’t perform that action at this time.
0 commit comments