Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fsfahrttool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sarah Kleest-Meißner
fsfahrttool
Commits
9e992f60
Verified
Commit
9e992f60
authored
7 years ago
by
Manuel Herrmann
Browse files
Options
Downloads
Patches
Plain Diff
added sysklogd as syslogger; redirected nginx messages; startup script improvements
parent
17561f86
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker/DockerfileNginx
+1
-0
1 addition, 0 deletions
docker/DockerfileNginx
docker/run-web.sh
+24
-3
24 additions, 3 deletions
docker/run-web.sh
with
25 additions
and
3 deletions
docker/DockerfileNginx
+
1
−
0
View file @
9e992f60
FROM richarvey/nginx-php-fpm
FROM richarvey/nginx-php-fpm
RUN apk add --no-cache sysklogd
ADD run-web.sh /
ADD run-web.sh /
RUN chmod 755 /run-web.sh
RUN chmod 755 /run-web.sh
...
...
This diff is collapsed.
Click to expand it.
docker/run-web.sh
+
24
−
3
View file @
9e992f60
#!/bin/bash
#!/bin/bash
# fix php-fpm
sed
-ri
'
sed
-ri
'
/^php_flag\[display_errors\]/ d
/^php_flag\[display_errors\]/ d
$ a php_flag[display_errors] = on
'
/usr/local/etc/php-fpm.conf
'
/usr/local/etc/php-fpm.conf
sed
-ri
'
# check if our changes were applied yet
if
!
grep
-E
'^\[program:sysklogd\]$'
/etc/supervisord.conf
>
&/dev/null
;
then
# fix php-fpm configs
sed
-ri
'
/^;?error_log/ c error_log = syslog
/^;?error_log/ c error_log = syslog
/^;?syslog.facility/ c syslog.facility = daemon
/^;?syslog.facility/ c syslog.facility = daemon
/^;?syslog.ident/ c syslog.ident = php-fpm
/^;?syslog.ident/ c syslog.ident = php-fpm
/^;?log_level/ c log_level = notice
/^;?log_level/ c log_level = notice
'
/usr/local/etc/php-fpm.d/
*
.conf
'
/usr/local/etc/php-fpm.d/
*
.conf
tee
/usr/local/etc/php/conf.d/zzz-registration-system.ini
<<
END
# add our own logging configuration
tee
/usr/local/etc/php/conf.d/zzz-registration-system.ini
>
&/dev/null
<<
END
[PHP]
[PHP]
error_reporting = E_ALL & ~E_NOTICE
error_reporting = E_ALL & ~E_NOTICE
display_errors = On
display_errors = On
...
@@ -24,4 +28,21 @@ track_errors = On
...
@@ -24,4 +28,21 @@ track_errors = On
html_errors = On
html_errors = On
END
END
# fix nginx config access_log/error_log targets
sed
-ri
\
's/^([ \t]*)((access|error)_log) .*$/\1\2 syslog:server=unix:\/dev\/log,facility=local7,tag=nginx;/'
\
/etc/nginx/sites-enabled/
*
/etc/nginx/nginx.conf
# cleanup logging options in supervisord (startup)
sed
-ri
'/^std(err|out)_.*=/ d'
/etc/supervisord.conf
# add syslogger entry at the end of supervisord config
tee
-a
/etc/supervisord.conf
>
&/dev/null
<<
END
[program:sysklogd]
command = /usr/sbin/syslogd -d
autostart=true
autorestart=true
priority=1
END
fi
exec
/start.sh
exec
/start.sh
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment