-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM node:6.3 | ||
|
||
ENV NODE_ENV production | ||
ENV API_URL http://localhost:8080 | ||
ENV SENTRY_KEY_CLIENT https://[email protected]/80639 | ||
ENV SENTRY_KEY_SERVER https://44c105328ae544ae9928f9eb74b40061:[email protected]/80639 | ||
ENV PORT 8000 | ||
|
||
RUN apt-get -y update && apt-get -y install supervisor ssh rsync | ||
|
||
# logrotate | ||
RUN apt-get -y install logrotate | ||
COPY docker/supervisord.conf /etc/supervisor/supervisord.conf | ||
COPY docker/pm2.logrotate.conf /etc/logrotate.d/pm2 | ||
RUN cp /etc/cron.daily/logrotate /etc/cron.hourly | ||
|
||
# cache npm install when package.json hasn't changed | ||
WORKDIR /tmp | ||
ADD package.json package.json | ||
RUN npm install | ||
RUN npm install -g pm2 | ||
|
||
RUN mkdir /quran | ||
RUN cp -a /tmp/node_modules /quran | ||
|
||
WORKDIR /quran | ||
ADD . /quran/ | ||
RUN npm run build | ||
|
||
# ssh keys | ||
WORKDIR /root | ||
RUN mv /quran/.ssh /root/ | ||
|
||
# upload js and css | ||
WORKDIR /quran/static/dist | ||
RUN rsync --update --progress -raz . [email protected]:zones/assets/ | ||
|
||
# go back to /quran | ||
WORKDIR /quran | ||
|
||
EXPOSE 8000 | ||
CMD ["supervisord", "--nodaemon", "-c", "/etc/supervisor/supervisord.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
{ | ||
"name": "react-redux-universal-hot-example", | ||
"description": "Example of an isomorphic (universal) webapp using react redux and hot reloading", | ||
"repository": "https://github.com/erikras/react-redux-universal-hot-example", | ||
"logo": "http://node-js-sample.herokuapp.com/node.svg", | ||
"keywords": [ | ||
"react", | ||
"isomorphic", | ||
"universal", | ||
"webpack", | ||
"express", | ||
"hot reloading", | ||
"react-hot-reloader", | ||
"redux", | ||
"starter", | ||
"boilerplate", | ||
"babel" | ||
"apps": [ | ||
{ | ||
"name": "API", | ||
"script": "./bin/api.js", | ||
"env": { | ||
"NODE_PATH": "./api" | ||
} | ||
}, | ||
{ | ||
"name": "CLIENT", | ||
"script": "./bin/server.js", | ||
"env": { | ||
"NODE_PATH": "./src" | ||
} | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/root/.pm2/logs/*.log { | ||
hourly | ||
missingok | ||
rotate 8760 | ||
dateext | ||
compress | ||
delaycompress | ||
notifempty | ||
create 0640 www-data adm | ||
copytruncate | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[supervisord] | ||
nodaemon=true | ||
|
||
[program:pm2] | ||
command=pm2 start app.json -i 0 --no-daemon | ||
directory=/quran | ||
redirect_stderr=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
auto_start=true | ||
autorestart=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters