Skip to content

Commit 7620972

Browse files
committed
add logentries, nginx start and default to start.sh
1 parent 642c876 commit 7620972

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ COPY nginx.conf /etc/nginx/nginx.conf
2222
ENV PORT=5000
2323

2424
# Set the Working Directory for All Commands that Follow
25-
WORKDIR /app
25+
WORKDIR /app
26+
27+
COPY start.sh bin/
28+
29+
CMD ['sh', 'bin/start.sh']

start.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
if [ -n $LOGENTRIES_TOKEN ]
4+
then
5+
6+
cat <<RSYSLOGCONF > /etc/rsyslog.d/logentries.conf
7+
\$template Logentries,"$LOGENTRIES_TOKEN %HOSTNAME% %syslogtag%%msg%\\n"
8+
*.* @@data.logentries.com:80;Logentries
9+
RSYSLOGCONF
10+
11+
service rsyslog restart
12+
13+
fi
14+
15+
# delete old server.pid
16+
rm -f /app/tmp/pids/server.pid
17+
18+
# start up nginx in the background
19+
nginx &
20+
21+
npm start

0 commit comments

Comments
 (0)