Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 8ed0e76

Browse files
Merge pull request #21 from Human-Connection/following
Following
2 parents ddfaee4 + bb14fd1 commit 8ed0e76

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1181
-499
lines changed

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ LABEL Description="This image is used to start the hc-api-feathers" Vendor="Huma
44
# update unix packages
55
RUN apk update && apk upgrade
66
RUN rm -rf /var/cache/apk/*
7+
RUN yarn global add pm2
78

89
# expose the app port
910
EXPOSE 3030
@@ -15,9 +16,12 @@ ENV NODE_ENV=production
1516
ENV API_PORT=3030
1617

1718
# start the application in a autohealing cluster
18-
#CMD NODE_ENV=production pm2 start server/index.js -n api -i 0 --attach
19+
# NOTE: quick fix for server issues, restart api when reaching max of 300 MB Memory Usage (happens in conjunction with 100% CPU Usage)
20+
# TODO: find better way of dealing with that issue
21+
CMD NODE_ENV=production pm2 start server/index.js -n api --attach --max-memory-restart 300M
22+
# CMD NODE_ENV=production pm2 start server/index.js -n api -i 2 --attach
1923
# as we have issues with pm2 currently in conjunction with nuxt, we use the standard approach here
20-
CMD NODE_ENV=production node server/index.js
24+
# CMD NODE_ENV=production node server/index.js
2125

2226
# create working directory
2327
RUN mkdir -p /var/www/

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ Getting up and running is as easy as 1, 2, 3, 4 ... 5.
8181
We are using [Thumbor](https://github.com/thumbor/thumbor) as a Thumbnail Microservice.
8282
You can install it locally if you like but this is totally optional.
8383
84-
- At first you have to [install](http://thumbor.readthedocs.io/en/latest/installing.html) it locally.
85-
- After installation start it via the console with `thumbor`
86-
- Set the `thumbor.url` in `config/local.json` to `http://localhost:8888` if not defined differently. The `thumbor.key` does not necessarily have to be defined, it just makes the URL more secure.
84+
**Install OR use docker**
85+
86+
- At first you have to [install](http://thumbor.readthedocs.io/en/latest/installing.html) it locally and start it in the console with `thumbor` **OR** run it with docker `docker run -p 8000:8000 apsl/thumbor`
87+
- Set the `thumbor.url` in `config/local.json` to `http://localhost:8888` (with docker `http://localhost:8000`) if not defined differently. The `thumbor.key` does not necessarily have to be defined, it just makes the URL more secure.
8788
8889
> Do not forget to always start it if you choose that setup or otherwise you will not see any pictures at all.
8990

config/default.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
"frontURL": "http://localhost:3000",
66
"public": "../public/",
77
"debug": true,
8+
"logLevel": "log",
89
"paginate": {
910
"default": 10,
10-
"max": 50
11+
"max": 100
1112
},
1213
"thumbor": {
1314
"url": "",

config/production.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"frontURL": "WEBAPP_BASE_URL",
66
"mongodb": "MONGO_DB",
77
"debug": true,
8+
"logLevel": "warn",
89
"smtpConfig": {
910
"host": "SMTP_HOST",
1011
"port": 587,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@import '../../layout/common';
1+
@import '../../../layout/common';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@import '../../layout/common';
1+
@import '../../../layout/common';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@import '../../layout/common';
1+
@import '../../../layout/common';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@import '../../layout/common';
1+
@import '../../../layout/common';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@import '../../layout/common';
1+
@import '../../../layout/common';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@import '../../layout/common';
1+
@import '../../../layout/common';

0 commit comments

Comments
 (0)